static properties
This commit is contained in:
@@ -1533,9 +1533,16 @@ function parse($TEXT, options) {
|
||||
}
|
||||
|
||||
function concise_method_or_getset(name, start) {
|
||||
var is_static = false;
|
||||
if (name === "static" && !is("punc", "(")) {
|
||||
is_static = true;
|
||||
name = S.token.value;
|
||||
next();
|
||||
}
|
||||
if (is("punc", "(")) {
|
||||
return new AST_ConciseMethod({
|
||||
start : start,
|
||||
static : is_static,
|
||||
name : new AST_SymbolMethod({ name: name }),
|
||||
argnames : params_or_seq_().as_params(croak),
|
||||
body : _function_body(true),
|
||||
@@ -1545,6 +1552,7 @@ function parse($TEXT, options) {
|
||||
if (name == "get") {
|
||||
return new AST_ObjectGetter({
|
||||
start : start,
|
||||
static: is_static,
|
||||
key : as_atom_node(),
|
||||
value : function_(AST_Accessor),
|
||||
end : prev()
|
||||
@@ -1553,6 +1561,7 @@ function parse($TEXT, options) {
|
||||
if (name == "set") {
|
||||
return new AST_ObjectSetter({
|
||||
start : start,
|
||||
static: is_static,
|
||||
key : as_atom_node(),
|
||||
value : function_(AST_Accessor),
|
||||
end : prev()
|
||||
|
||||
Reference in New Issue
Block a user