diff options
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) { |