コード例 #1
0
ファイル: Expressions.cs プロジェクト: Deliay/SuperBasic
 public Unary(Token tok, Expr exp) : base(tok, null)
 {
     Expr = exp;
     Type = ReserveType.Max(ReserveType.Int32, Expr.Type);
     if (Type == null)
     {
         throw new TypeCovertException(tok.Line, Type, Expr.Type);
     }
 }
コード例 #2
0
ファイル: Expressions.cs プロジェクト: Deliay/SuperBasic
 public Arith(Token tok, Expr x1, Expr x2) : base(tok, null)
 {
     First  = x1;
     Second = x2;
     Type   = ReserveType.Max(First.Type, Second.Type);
     if (Type == null)
     {
         throw new TypeCovertException(tok.Line, First.Type, Second.Type);
     }
 }