Skip to content

Commit

Permalink
ans is not err
Browse files Browse the repository at this point in the history
  • Loading branch information
Lingdong Huang committed Dec 26, 2019
1 parent b680a1d commit c97ae15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions site/ide.html
Original file line number Diff line number Diff line change
Expand Up @@ -33837,7 +33837,7 @@
gettok(i + 2, 0) == "ctnr" &&
gettok(i + 2, 1) == "subs"
) {
typeassert(i + 1, ["iden", "lit"]);
typeassert(i + 1, ["iden", "lit", "ans"]);
var x = {
op: "subscript",
container: tokens[i + 1],
Expand All @@ -33852,7 +33852,7 @@
gettok(i + 2, 0) == "ctnr" &&
gettok(i + 2, 1) == "len"
) {
typeassert(i + 1, ["iden", "lit"]);
typeassert(i + 1, ["iden", "lit", "subs"]);
var x = { op: "length", container: tokens[i + 1], pos };
asc.push(x);
i += 3;
Expand Down
4 changes: 2 additions & 2 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ function tokens2asc(
gettok(i + 2, 0) == "ctnr" &&
gettok(i + 2, 1) == "subs"
) {
typeassert(i + 1, ["iden", "lit"]);
typeassert(i + 1, ["iden", "lit", "ans"]);
var x = {
op: "subscript",
container: tokens[i + 1],
Expand All @@ -441,7 +441,7 @@ function tokens2asc(
gettok(i + 2, 0) == "ctnr" &&
gettok(i + 2, 1) == "len"
) {
typeassert(i + 1, ["iden", "lit"]);
typeassert(i + 1, ["iden", "lit", "subs"]);
var x = { op: "length", container: tokens[i + 1], pos };
asc.push(x);
i += 3;
Expand Down

0 comments on commit c97ae15

Please sign in to comment.