Possible dev relic.
readToken_slash currently does not have any arguments and does not appear to look at arguments. All existing tests pass after removal of extraneous argument while calling readToken_slash.
http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters
The final parameter to a function is a rest parameter if it is
prefixed by "...". FunctionExpression and FunctionDeclaration
nodes have a new "rest" property that is null if there is no
rest parameter, or contains an Identifer for the parameter.
https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API#Functions
Implemented by adding a new token, `_ellipsis`, which consists of
three dots. Modified the body of parseFunction to allow a single
rest parameter at the end of an argument list. Both the token and
the rest parameter require `options.ecmaVersion` >= 6, otherwise
three dots are tokenized as three dots.
Before this the ast produced by parse_dammit crashed in the following
code, as Uglify correctly noticed that f."" is invalid.
sample = 'f."';
loose = require('acorn/acorn_loose');
uglify = require('uglify-js');
out = new uglify.OutputStream();
ast = loose.parse_dammit(sample);
ast = uglify.AST_Node.from_mozilla_ast(ast);
ast.print(out);
// TypeError: Cannot call method 'toString' of undefined
// member_exp.computed = false && member_exp.property == ""
console.log(out.toString());
After this the round-tripped AST looks like: `t.✖;"";`, which is
consistent with how `foo.{` is parsed.
I also considered making it parse as t[""], but as this only turns up in
the wild when people try to use multiline strings, I felt it was better
to be obviously wrong.
Both readString and skipLineComment considered 8232/8233 as eol, but skipSpace itself would not increment the line counters if they were found.
Previously 8232/8233 were listed in nonASCIIwhitespace, but since that is only used within skipSpace and those values are checked separately, they could be removed from nonASCIIwhitespace.
Just being consistent.
In every other place where a between comparison is done, the lower limit is on the left. It's a whole lot easier to see it's a between comparison when the limits are in order.