Fixed various parser bugs, implemented unary operators
This commit is contained in:
@@ -12,13 +12,12 @@ export default class IndexNode extends ParseNode {
|
||||
let selection = this.array.values[index.value - 1];
|
||||
if (selection){
|
||||
let result = selection[fn](scope, context);
|
||||
result.inheritDetails([index, this]);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return new IndexNode({
|
||||
index,
|
||||
array: this.array[fn](scope, context),
|
||||
index: this.index[fn](scope, context),
|
||||
previousNodes: [this],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user