Exemple #1
0
        public void VisitVarDeclaration(VarDeclarationContext context)
        {
            var ids = context.IDENTIFIER();

            foreach (var id in ids)
            {
                builder.DeclareVariable(id.GetText());
            }
        }
Exemple #2
0
 public static VarDeclaration ToAst(this VarDeclarationContext varDeclarationContext)
 {
     return(new VarDeclaration(varDeclarationContext.type().ToAst(), varDeclarationContext.Identifier().GetText()));
 }