示例#1
0
        public override ASTNode VisitEnumDeclItem([NotNull] llangParser.EnumDeclItemContext context)
        {
            string     name = context.Iden().GetText();
            Expression rhs  = null;

            if (context.Number() != null)
            {
                rhs = new IntExprNode(long.Parse(context.Number().GetText()), MakeSourceLoc(context));
            }

            return(new VarDeclNode(name, rhs, TypeSymbol.INT_SYMBOL, MakeSourceLoc(context)));
        }
示例#2
0
 public override MIPSRegister VisitIntExprNode(IntExprNode n)
 {
     return(base.VisitIntExprNode(n));
 }
示例#3
0
 public override LLVMRegister VisitIntExprNode(IntExprNode n)
 {
     throw new NotImplementedException();
 }
示例#4
0
 public object VisitIntExprNode(IntExprNode n)
 {
     WriteLine(n.kind + " - " + n.IntValue + ":" + n.Type);
     return(null);
 }
示例#5
0
 public override LData VisitIntExprNode(IntExprNode n)
 {
     return(new LInt(n.IntValue));
 }
示例#6
0
 public virtual T VisitIntExprNode(IntExprNode n)
 {
     return(default(T));
 }