Beispiel #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;
                }
            }
        }
Beispiel #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);
        }
Beispiel #3
0
 public NNew(NType type, NIdentBase next, NArgs args = null) : base(type.Name, next)
 {
     Type = type;
     Args = args ?? new NArgs();
 }
Beispiel #4
0
 public NIndex(NIdentBase next, NArgs args = null) : base("Indexer", next)
 {
     Args = args ?? new NArgs();
 }
Beispiel #5
0
 public NRelative(string name, NIdentBase next, NKind kind) : base(name, next)
 {
     Kind = kind;
 }
Beispiel #6
0
 public NType(string name, NIdentBase next, NKind kind, NIdentBase ident) : base(name, next)
 {
     Kind  = kind;
     Ident = ident;
 }
Beispiel #7
0
 public NMethod(string name, NIdentBase next, NArgs args = null) : base(name, next)
 {
     Args = args ?? new NArgs();
 }
Beispiel #8
0
 public NIdent(string name, NIdentBase next) : base(name, next)
 {
 }
Beispiel #9
0
 public NExprIdent(NBase expr, NIdentBase next) : base("expr", next)
 {
     Expr = expr;
 }
Beispiel #10
0
 public NIdentBase(string name, NIdentBase next)
 {
     Name = name;
     Next = next;
 }
 public NAssign(NIdentBase left, NBase expr)
 {
     Left = left;
     Expr = expr;
 }
 public NIndex(NIdentBase next, IEnumerable <NBase> args = null) : base("Indexer", next)
 {
     Args = new List <NBase>(args ?? new NBase[] { });
 }
 public NMethod(string name, NIdentBase next, IEnumerable <NBase> args = null) : base(name, next)
 {
     Args = new List <NBase>(args ?? new NBase[] { });
 }