added $propdoc to AST nodes and some cleanups
hopefully we can make the AST documentation self-generating
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user