diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-10-09 16:25:45 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-10-09 18:20:39 +0300 |
commit | 1b0aab2ce9e7f429ceeda98ee0cda448085918ec (patch) | |
tree | 7bacc8e28f9af93cbc068ea7aa5256266a4d5333 /lib/parse.js | |
parent | 9ead49641da82de3a27ed813a056628f83da379c (diff) | |
download | tracifyjs-1b0aab2ce9e7f429ceeda98ee0cda448085918ec.tar.gz tracifyjs-1b0aab2ce9e7f429ceeda98ee0cda448085918ec.zip |
added $propdoc to AST nodes and some cleanups
hopefully we can make the AST documentation self-generating
Diffstat (limited to 'lib/parse.js')
-rw-r--r-- | lib/parse.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/parse.js b/lib/parse.js index 10a0f1af..a66b32a3 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -528,7 +528,7 @@ function tokenizer($TEXT, filename) { regexp += ch; } var mods = read_name(); - return token("regexp", [ regexp, mods ]); + return token("regexp", new RegExp(regexp, mods)); }); }; @@ -1160,7 +1160,7 @@ function parse($TEXT, options) { ret = new AST_String({ start: tok, end: tok, value: tok.value }); break; case "regexp": - ret = new AST_RegExp({ start: tok, end: tok, pattern: tok.value[0], mods: tok.value[1] }); + ret = new AST_RegExp({ start: tok, end: tok, value: tok.value }); break; case "atom": switch (tok.value) { |