disabled interpolations in normal regexes

This commit is contained in:
satyr
2010-10-04 21:50:50 +09:00
parent 493fa7d8fe
commit cdd033ffb0
10 changed files with 194 additions and 243 deletions

View File

@@ -8,9 +8,9 @@
if (!(action)) {
return [patternString, '$$ = $1;', options];
}
action = (match = (action + '').match(unwrap)) ? match[1] : ("(" + (action) + "())");
action = (match = (action + '').match(unwrap)) ? match[1] : ("(" + action + "())");
action = action.replace(/\b(?:[A-Z][a-z]+Node|Expressions)\b/g, 'yy.$&');
return [patternString, ("$$ = " + (action) + ";"), options];
return [patternString, ("$$ = " + action + ";"), options];
};
grammar = {
Root: [