Esempio n. 1
0
        private Type Check(Type lft, Type rht)
        {
            switch (Op.tag_value)
            {
            case OR:
            case AND: return((lft == Type.Bool && rht == Type.Bool) ? Type.Bool : null);

            default: return(lft == rht ? Type.Bool : null);
            }
        }
Esempio n. 2
0
 public Morpheme(string n, MorphemeAttribute a, Stmt stmt, List <Morpheme> list, Type t)
 {
     type      = t;
     name      = n;
     attribute = a;
     this.stmt = stmt;
     up_list   = new List <Morpheme>(list ?? new List <Morpheme>())
     {
         this
     };
 }
Esempio n. 3
0
File: Def.cs Progetto: Asixa/Orange
        public static Stmt Match()
        {
            Match(DEF);
            var match = Type.Match();
            var tok   = Look;

            Match(ID);
            Match(';');
            var id = new Def(tok.ToString(), null, match);

            return(id);
        }
Esempio n. 4
0
 public Factor(Token tok, Type type) : base(tok, type)
 {
 }
Esempio n. 5
0
 protected LogicNode(Token tok, Type type)
 {
     Op        = tok;
     this.type = type;
 }
Esempio n. 6
0
File: Def.cs Progetto: Asixa/Orange
 public Def(string n, Core.Type t, LogicNode match)
 {
     name      = n;
     type      = t;
     MatchType = match;
 }