});
function as_property_name() {
- var tmp;
- switch (S.token.type) {
+ var tmp = S.token;
+ next();
+ switch (tmp.type) {
case "num":
case "string":
case "name":
case "operator":
case "keyword":
case "atom":
- return (tmp = S.token.value, next(), tmp);
+ return tmp.value;
default:
unexpected();
}
};
function as_name() {
- var tmp;
- switch (S.token.type) {
+ var tmp = S.token;
+ next();
+ switch (tmp.type) {
case "name":
case "operator":
case "keyword":
case "atom":
- return (tmp = S.token.value, next(), tmp);
+ return tmp.value;
default:
unexpected();
}
};
var maybe_unary = function(allow_calls) {
- var start = S.token, tmp;
- if (is("operator") && UNARY_PREFIX(S.token.value)) {
- var ex = make_unary(AST_UnaryPrefix,
- (tmp = S.token.value, next(), tmp),
- maybe_unary(allow_calls));
+ var start = S.token;
+ if (is("operator") && UNARY_PREFIX(start.value)) {
+ next();
+ var ex = make_unary(AST_UnaryPrefix, start.value, maybe_unary(allow_calls));
ex.start = start;
ex.end = prev();
return ex;