use of org.mozilla.javascript.ast.InfixExpression in project HL4A by HL4A.
the class Parser method addExpr.
private AstNode addExpr() throws IOException {
AstNode pn = mulExpr();
for (; ; ) {
int tt = peekToken(), opPos = ts.tokenBeg;
if (tt == Token.ADD || tt == Token.SUB) {
consumeToken();
pn = new InfixExpression(tt, pn, mulExpr(), opPos);
continue;
}
break;
}
return pn;
}
use of org.mozilla.javascript.ast.InfixExpression in project HL4A by HL4A.
the class Parser method relExpr.
private AstNode relExpr() throws IOException {
AstNode pn = shiftExpr();
for (; ; ) {
int tt = peekToken(), opPos = ts.tokenBeg;
switch(tt) {
case Token.IN:
if (inForInit)
break;
// fall through
case Token.INSTANCEOF:
case Token.LE:
case Token.LT:
case Token.GE:
case Token.GT:
consumeToken();
pn = new InfixExpression(tt, pn, shiftExpr(), opPos);
continue;
}
break;
}
return pn;
}
use of org.mozilla.javascript.ast.InfixExpression in project HL4A by HL4A.
the class Parser method bitAndExpr.
private AstNode bitAndExpr() throws IOException {
AstNode pn = eqExpr();
while (matchToken(Token.BITAND)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.BITAND, pn, eqExpr(), opPos);
}
return pn;
}
use of org.mozilla.javascript.ast.InfixExpression in project HL4A by HL4A.
the class Parser method andExpr.
private AstNode andExpr() throws IOException {
AstNode pn = bitOrExpr();
if (matchToken(Token.AND)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.AND, pn, andExpr(), opPos);
}
return pn;
}
use of org.mozilla.javascript.ast.InfixExpression in project HL4A by HL4A.
the class Parser method shiftExpr.
private AstNode shiftExpr() throws IOException {
AstNode pn = addExpr();
for (; ; ) {
int tt = peekToken(), opPos = ts.tokenBeg;
switch(tt) {
case Token.LSH:
case Token.URSH:
case Token.RSH:
consumeToken();
pn = new InfixExpression(tt, pn, addExpr(), opPos);
continue;
}
break;
}
return pn;
}
Aggregations