Esempio n. 1
0
        public static Compilerbau.AST.Type ToAst(this TypeContext typeContext)
        {
            switch (typeContext.GetText())
            {
            case "int": return(new Int());

            case "int[]": return(new IntArray());

            case "boolean": return(new Compilerbau.AST.Boolean());

            default: return(new ObjectType(typeContext.Identifier().GetText()));    //identifier case
            }
        }