Fix: AST_Accessor missing start / end tokens

fixes #1492
closes #1493
This commit is contained in:
Ondřej Španěl
2017-02-20 17:14:53 +08:00
committed by alexlamsl
parent 26fbeece1c
commit d48a3080ac
2 changed files with 38 additions and 2 deletions

View File

@@ -1308,6 +1308,10 @@ function parse($TEXT, options) {
});
});
var create_accessor = embed_tokens(function() {
return function_(AST_Accessor);
});
var object_ = embed_tokens(function() {
expect("{");
var first = true, a = [];
@@ -1324,7 +1328,7 @@ function parse($TEXT, options) {
a.push(new AST_ObjectGetter({
start : start,
key : as_atom_node(),
value : function_(AST_Accessor),
value : create_accessor(),
end : prev()
}));
continue;
@@ -1333,7 +1337,7 @@ function parse($TEXT, options) {
a.push(new AST_ObjectSetter({
start : start,
key : as_atom_node(),
value : function_(AST_Accessor),
value : create_accessor(),
end : prev()
}));
continue;