};
};
- var statement = embed_tokens(function() {
- var tmp;
+ function handle_regexp() {
if (is("operator", "/") || is("operator", "/=")) {
S.peeked = null;
S.token = S.input(S.token.value.substr(1)); // force regexp
}
+ };
+
+ var statement = embed_tokens(function() {
+ var tmp;
+ handle_regexp();
switch (S.token.type) {
case "string":
var dir = S.in_directives, stat = simple_statement();
var start = S.token;
if (is("operator") && UNARY_PREFIX(start.value)) {
next();
+ handle_regexp();
var ex = make_unary(AST_UnaryPrefix, start.value, maybe_unary(allow_calls));
ex.start = start;
ex.end = prev();