Browse Source

removed restriction on def grammar

pull/21/head
wes 12 years ago
parent
commit
0a21cbd57e
  1. 4
      parse.js

4
parse.js

@ -1,4 +1,4 @@
#! /usr/bin/node #! /usr/bin/nodejs
var typ = require("./representation.js"); var typ = require("./representation.js");
var tool = require("./tools.js"); var tool = require("./tools.js");
@ -76,7 +76,7 @@ function parseDef(tokens) {
} }
else { else {
var identifier = parse(tokens); var identifier = parse(tokens);
if (!notFollowedBy(tokens, ["def", "comma", "left_paren", "arrow", "right_brace", "right_square"])) { if (!notFollowedBy(tokens, ["def", "comma", "arrow", "right_brace", "right_square"])) {
console.log("Error: def " + identifier.val + " must not be followed by " + fst(tokens)[0]); console.log("Error: def " + identifier.val + " must not be followed by " + fst(tokens)[0]);
return; return;
} }

Loading…
Cancel
Save