Ejemplo n.º 1
0
        public UstNode VisitVariableDeclarator(JavaParser.VariableDeclaratorContext context)
        {
            var id = (IdToken)Visit(context.variableDeclaratorId());

            JavaParser.VariableInitializerContext variableInitializer = context.variableInitializer();
            Expression initializer = variableInitializer != null ?
                                     (Expression)Visit(variableInitializer) : null;

            var result = new AssignmentExpression(id, initializer, context.GetTextSpan(), FileNode);

            return(result);
        }
Ejemplo n.º 2
0
        public UstNode VisitVariableInitializer(JavaParser.VariableInitializerContext context)
        {
            var result = (Expression)Visit(context.GetChild(0));

            return(result);
        }
Ejemplo n.º 3
0
 public override bool VisitVariableInitializer([NotNull] JavaParser.VariableInitializerContext context)
 {
     return(true);
 }