Skip to content

Commit 97fddf3

Browse files
authored
Non call echo (#166)
* Fix display Pending... for non call echo * Fix CI * Fix tests
1 parent 4b4c1a8 commit 97fddf3

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

runtime/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export function createRuntime(initialCode) {
117117
function observer(state) {
118118
return {
119119
pending() {
120-
clear(state);
121-
if (state.doc) echo(state, "Pending…", {quote: false});
120+
// clear(state);
121+
// if (state.doc) echo(state, "Pending…", {quote: false});
122122
},
123123
fulfilled() {
124124
// Before blocks are fulfilled, their position might be changed or
@@ -264,7 +264,6 @@ export function createRuntime(initialCode) {
264264
node.state = state;
265265
const v = main.variable(observer(state), {shadow: {}});
266266
if (inputs.includes("echo")) {
267-
state.doc = true;
268267
let docVersion = -1;
269268
const vd = new v.constructor(2, v._module);
270269
vd.define(

test/js/index-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ export {runtimeError} from "./runtime-error.js";
77
export {syntaxError2} from "./syntax-error2.js";
88
export {syntaxError3} from "./syntax-error3.js";
99
export {syntaxError4} from "./syntax-error4.js";
10+
export {nonCallEcho} from "./non-call-echo.js";

test/js/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ export {jsDocString} from "./js-doc-string.js";
1616
export {commentLink} from "./comment-link.js";
1717
export {syntaxError3} from "./syntax-error3.js";
1818
export {syntaxError4} from "./syntax-error4.js";
19+
export {nonCallEcho} from "./non-call-echo.js";

test/js/non-call-echo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const nonCallEcho = `echo`;

test/output/nonCallEcho.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
echo

0 commit comments

Comments
 (0)