Allow operator names as getters/setters
Fixes #919 Fix provided by @kzc
This commit is contained in:
committed by
Richard van Velzen
parent
ebe118dc79
commit
26641f3fb2
@@ -1178,6 +1178,13 @@ function parse($TEXT, options) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "operator":
|
||||
if (!is_identifier_string(tok.value)) {
|
||||
throw new JS_Parse_Error("Invalid getter/setter name: " + tok.value,
|
||||
tok.file, tok.line, tok.col, tok.pos);
|
||||
}
|
||||
ret = _make_symbol(AST_SymbolRef);
|
||||
break;
|
||||
}
|
||||
next();
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user