Esempio n. 1
0
        public override Tree VisitFieldDef(FieldDefContext context)
        {
            String   name = context.name.Text;
            TypeTree type = (TypeTree)VisitType(context.type());

            return(new VariableDeclaration(context.Start.Line, context.Start.Column, context.Stop.Line,
                                           context.Stop.Column, name, type, null));
        }
Esempio n. 2
0
        public override Tree VisitMemberDef(MemberDefContext context)
        {
            FieldDefContext fieldDef = context.fieldDef();

            if (fieldDef != null)
            {
                return(VisitFieldDef(fieldDef));
            }
            FuncDeclarationContext funcDeclaration = context.funcDeclaration();

            return(VisitFuncDeclaration(funcDeclaration));
        }