use of com.google.javascript.jscomp.parsing.parser.trees.BinaryOperatorTree in project closure-compiler by google.
the class Parser method parseRelational.
// 11.8 Relational
private ParseTree parseRelational(Expression expressionIn) {
SourcePosition start = getTreeStartLocation();
ParseTree left = parseShiftExpression();
while (peekRelationalOperator(expressionIn)) {
Token operator = nextToken();
ParseTree right = parseShiftExpression();
left = new BinaryOperatorTree(getTreeLocation(start), left, operator, right);
}
return left;
}
use of com.google.javascript.jscomp.parsing.parser.trees.BinaryOperatorTree in project closure-compiler by google.
the class Parser method parseBitwiseOR.
// 11.10 Bitwise OR
private ParseTree parseBitwiseOR(Expression expressionIn) {
SourcePosition start = getTreeStartLocation();
ParseTree left = parseBitwiseXOR(expressionIn);
while (peek(TokenType.BAR)) {
Token operator = eat(TokenType.BAR);
ParseTree right = parseBitwiseXOR(expressionIn);
left = new BinaryOperatorTree(getTreeLocation(start), left, operator, right);
}
return left;
}
use of com.google.javascript.jscomp.parsing.parser.trees.BinaryOperatorTree in project closure-compiler by google.
the class Parser method parseEquality.
// 11.9 Equality Expression
private ParseTree parseEquality(Expression expressionIn) {
SourcePosition start = getTreeStartLocation();
ParseTree left = parseRelational(expressionIn);
while (peekEqualityOperator()) {
Token operator = nextToken();
ParseTree right = parseRelational(expressionIn);
left = new BinaryOperatorTree(getTreeLocation(start), left, operator, right);
}
return left;
}
use of com.google.javascript.jscomp.parsing.parser.trees.BinaryOperatorTree in project closure-compiler by google.
the class Parser method parseShiftExpression.
// 11.7 Shift Expression
private ParseTree parseShiftExpression() {
SourcePosition start = getTreeStartLocation();
ParseTree left = parseAdditiveExpression();
while (peekShiftOperator()) {
Token operator = nextToken();
ParseTree right = parseAdditiveExpression();
left = new BinaryOperatorTree(getTreeLocation(start), left, operator, right);
}
return left;
}
use of com.google.javascript.jscomp.parsing.parser.trees.BinaryOperatorTree in project closure-compiler by google.
the class Parser method parseBitwiseAND.
// 11.10 Bitwise AND
private ParseTree parseBitwiseAND(Expression expressionIn) {
SourcePosition start = getTreeStartLocation();
ParseTree left = parseEquality(expressionIn);
while (peek(TokenType.AMPERSAND)) {
Token operator = eat(TokenType.AMPERSAND);
ParseTree right = parseEquality(expressionIn);
left = new BinaryOperatorTree(getTreeLocation(start), left, operator, right);
}
return left;
}
Aggregations