@Test public void testEqualBooleanLiteralTrue() throws Exception { Equal equal = new Equal(1, new BooleanLiteral(1, true), new BooleanLiteral(1, true)); BooleanValue value = (BooleanValue) evaluator.visit(equal); assertEquals(true, value.getValue()); }
@Override public Value visit(GroupedExpression node) { return node.getExpression().accept(this); }
Evaluator implements ExpressionVisitor<Value> { @Override public Value visit(GroupedExpression node) { return node.getExpression().accept(this); } }
Evaluator implements ExpressionVisitor<Value> { @Override public Value visit(GroupedExpression node) { return node.getExpression().accept(this); } Evaluator(Environment environmentsTable); }
Evaluator implements ExpressionVisitor<Value> { @Override public Value visit(GroupedExpression node) { return node.getExpression().accept(this); } Evaluator(Environment environmentsTable); @Override Value visit(GroupedExpression node); @Override Value visit(Identifier identifier); @Override Value visit(StringerLiteral stringerLiteral); @Override Value visit(IntegerLiteral integerLiteral); @Override Value visit(BooleanLiteral booleanLiteral); @Override Value visit(Expression expression); @Override Value visit(Addition addition); @Override Value visit(Division division); @Override Value visit(Equal equal); @Override Value visit(GreaterThan greaterThan); @Override Value visit(GreaterThanOrEqual greaterThanOrEqual); @Override Value visit(LessThan lessThan); @Override Value visit(LessThanOrEqual lessThanOrEqual); @Override Value visit(LogicalAnd logicalAnd); @Override Value visit(LogicalOr logicalOr); @Override Value visit(Multiplication multiplication); @Override Value visit(NotEqual notEqual); @Override Value visit(Subtraction subtraction); }
Evaluator implements ExpressionVisitor<Value> { @Override public Value visit(GroupedExpression node) { return node.getExpression().accept(this); } Evaluator(Environment environmentsTable); @Override Value visit(GroupedExpression node); @Override Value visit(Identifier identifier); @Override Value visit(StringerLiteral stringerLiteral); @Override Value visit(IntegerLiteral integerLiteral); @Override Value visit(BooleanLiteral booleanLiteral); @Override Value visit(Expression expression); @Override Value visit(Addition addition); @Override Value visit(Division division); @Override Value visit(Equal equal); @Override Value visit(GreaterThan greaterThan); @Override Value visit(GreaterThanOrEqual greaterThanOrEqual); @Override Value visit(LessThan lessThan); @Override Value visit(LessThanOrEqual lessThanOrEqual); @Override Value visit(LogicalAnd logicalAnd); @Override Value visit(LogicalOr logicalOr); @Override Value visit(Multiplication multiplication); @Override Value visit(NotEqual notEqual); @Override Value visit(Subtraction subtraction);  }