ScoreVisitorImpl extends AbstractParseTreeVisitor<FixValue<?>> implements ScoreVisitor<FixValue<?>> { @Override public FixValue<?> visitInteger(IntegerContext ctx) { return new FixValue<Integer>(FixType.intType, Integer.parseInt(ctx.UINT().getText())); } ScoreVisitorImpl(SymbolResolver symbolResolver);  ScoreVisitorImpl(SymbolResolver symbolResolver, SemanticErrorListener errorListener); boolean isTrace(); void setTrace(boolean trace); @Override FixValue<?> visitAddSub(AddSubContext ctx); @Override FixValue<?> visitAnyExpression(AnyExpressionContext ctx); @Override FixValue<?> visitAssignment(AssignmentContext ctx); @Override FixValue<?> visitCharacter(CharacterContext ctx); @Override FixValue<?> visitContains(ContainsContext ctx); @Override FixValue<?> visitDateonly(DateonlyContext ctx); @Override FixValue<?> visitDecimal(DecimalContext ctx); @Override FixValue<?> visitDuration(DurationContext ctx); @Override FixValue<Boolean> visitEquality(EqualityContext ctx); @Override FixValue<?> visitExist(ExistContext ctx); @Override FixValue<?> visitIndex(IndexContext ctx); @Override FixValue<?> visitInteger(IntegerContext ctx); @SuppressWarnings("unchecked") @Override FixValue<Boolean> visitLogicalAnd(LogicalAndContext ctx); @Override FixValue<Boolean> visitLogicalNot(LogicalNotContext ctx); @Override FixValue<Boolean> visitLogicalOr(LogicalOrContext ctx); @Override FixValue<?> visitMulDiv(MulDivContext ctx); @Override FixValue<?> visitParens(ParensContext ctx); @Override FixValue<?> visitPred(PredContext ctx); @Override FixValue<?> visitQual(QualContext ctx); @Override FixValue<?> visitRange(RangeContext ctx); @Override FixValue<Boolean> visitRelational(RelationalContext ctx); @Override FixValue<?> visitString(StringContext ctx); @Override FixValue<?> visitTimeonly(TimeonlyContext ctx); @Override FixValue<?> visitTimestamp(TimestampContext ctx); @SuppressWarnings("unchecked") @Override FixValue<?> visitUnaryMinus(UnaryMinusContext ctx); @Override FixValue<?> visitVar(VarContext ctx); @Override FixValue<?> visitVariable(VariableContext ctx);  }
@Test public void testVisitInteger() throws IOException { final String value = "456"; ScoreParser parser = parse(value); AnyExpressionContext ctx = parser.anyExpression(); Object expression = visitor.visitAnyExpression(ctx); assertTrue(expression instanceof FixValue<?>); FixValue<?> fixValue = (FixValue<?>) expression; assertEquals(FixType.intType, fixValue.getType()); assertEquals(Integer.valueOf(value), fixValue.getValue()); }