start concise methods
This commit is contained in:
committed by
Richard van Velzen
parent
2babe737e0
commit
0d8dea9538
10
lib/parse.js
10
lib/parse.js
@@ -1446,6 +1446,16 @@ function parse($TEXT, options) {
|
||||
var type = start.type;
|
||||
var name = as_property_name();
|
||||
if (type == "name" && !is("punc", ":")) {
|
||||
if (is("punc", "(")) {
|
||||
a.push(new AST_ConciseMethod({
|
||||
start : start,
|
||||
name : new AST_Symbol({ name: name }), // TODO what symbol is this really?
|
||||
argnames : params_or_seq_().as_params(croak),
|
||||
body : _function_body(true),
|
||||
end : prev()
|
||||
}))
|
||||
continue;
|
||||
}
|
||||
if (name == "get") {
|
||||
a.push(new AST_ObjectGetter({
|
||||
start : start,
|
||||
|
||||
Reference in New Issue
Block a user