Пример #1
0
 public Dragon.Type Check(Dragon.Type lhs, Dragon.Type rhs)
 {
     if (lhs == Dragon.Type.Bool && rhs == Dragon.Type.Bool)
     {
         return(Dragon.Type.Bool);
     }
     return(null);
 }
Пример #2
0
        public Dragon.Type Dimension(Dragon.Type type)
        {
            this.Match('[');
            Token tok = _look;

            this.Match(Tag.NUM);
            this.Match(']');

            if (_look.TagValue == '[')
            {
                type = this.Dimension(type);
            }

            return(new Array(((Num)tok).Value, type));
        }
Пример #3
0
 public Dragon.Type check(Dragon.Type lft, Dragon.Type rht)
 {
     if (lft is Array || rht is Array)
     {
         return(null);
     }
     else if (lft == rht)
     {
         return(Dragon.Type.Bool);
     }
     else
     {
         return(null);
     }
 }
Пример #4
0
 public Constant(Token tok, Dragon.Type type)
     : base(tok, type)
 {
 }
Пример #5
0
 public Id(Word id, Dragon.Type type, int offset)
     : base(id, type)
 {
     this.Offset = offset;
 }