示例#1
0
        void ReadNextIdents(ref NBase n, bool allowMethod)
        {
            NIdentBase cur = n as NIdentBase; NBase next = null;

            while (la.kind == 59)
            {
                IndexExpr(out next);
                if (cur == null)
                {
                    cur = (NIdentBase)(n = new NExprIdent(n, null));
                }
                cur = cur.Next = (NIdentBase)next;
            }
            while (la.kind == 57)
            {
                NextIdentExpr(out next, allowMethod);
                if (cur == null)
                {
                    cur = (NIdentBase)(n = new NExprIdent(n, null));
                }
                cur = cur.Next = (NIdentBase)next;
                while (la.kind == 59)
                {
                    IndexExpr(out next);
                    cur = cur.Next = (NIdentBase)next;
                }
            }
        }
示例#2
0
        public IEnumerable <NIdentBase> Unfold()
        {
            var        res = new List <NIdentBase>();
            NIdentBase n   = this;

            while (n != null)
            {
                res.Add(n);
                n = n.Next;
            }
            return(res);
        }
示例#3
0
 public NAssign(NIdentBase left, NBase expr)
 {
     Left = left;
     Expr = expr;
 }
示例#4
0
 public NIndex(NIdentBase next, IEnumerable <NBase> args = null) : base("Indexer", next)
 {
     Args = new List <NBase>(args ?? new NBase[] { });
 }
示例#5
0
 public NRelative(string name, NIdentBase next, NKind kind) : base(name, next)
 {
     Kind = kind;
 }
示例#6
0
 public NType(string name, NIdentBase next, NKind kind, NIdentBase ident) : base(name, next)
 {
     Kind  = kind;
     Ident = ident;
 }
示例#7
0
 public NMethod(string name, NIdentBase next, IEnumerable <NBase> args = null) : base(name, next)
 {
     Args = new List <NBase>(args ?? new NBase[] { });
 }
示例#8
0
 public NIdent(string name, NIdentBase next) : base(name, next)
 {
 }
示例#9
0
 public NExprIdent(NBase expr, NIdentBase next) : base("expr", next)
 {
     Expr = expr;
 }
示例#10
0
 public NIdentBase(string name, NIdentBase next)
 {
     Name = name;
     Next = next;
 }