Skip to content

Commit beeb608

Browse files
committed
In Chapter 12, don't allow # in identifiers
Since we'll use it for comments in the exercises
1 parent 4cbbef5 commit beeb608

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

12_language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function parseExpression(program) {
159159
expr = {type: "value", value: match[1]};
160160
} else if (match = /^\d+\b/.exec(program)) {
161161
expr = {type: "value", value: Number(match[0])};
162-
} else if (match = /^[^\s(),"]+/.exec(program)) {
162+
} else if (match = /^[^\s(),#"]+/.exec(program)) {
163163
expr = {type: "word", name: match[0]};
164164
} else {
165165
throw new SyntaxError("Unexpected syntax: " + program);

0 commit comments

Comments
 (0)