JS: Add test and fix bug in pipe parser

This commit is contained in:
Asger Feldthaus
2020-12-11 14:47:21 +00:00
parent 16a2a60b9a
commit ed27c8b13f
5 changed files with 41 additions and 2 deletions

View File

@@ -41,9 +41,9 @@ public class AngularExpressionParser extends Parser {
}
SourceLocation loc = new SourceLocation(startLoc);
if (right instanceof Identifier) {
right = new AngularPipeRef(right.getLoc(), (Identifier)right);
right = new AngularPipeRef(new SourceLocation(right.getLoc()), (Identifier)right);
}
return this.finishNode(new CallExpression(loc, right, null, arguments, false, false));
return this.finishNode(new CallExpression(loc, right, new ArrayList<>(), arguments, false, false));
}
return super.buildBinary(startPos, startLoc, left, right, op, logical);
}