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; } } }
public IEnumerable <NIdentBase> Unfold() { var res = new List <NIdentBase>(); NIdentBase n = this; while (n != null) { res.Add(n); n = n.Next; } return(res); }
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 NRelative(string name, NIdentBase next, NKind kind) : base(name, next) { Kind = kind; }
public NType(string name, NIdentBase next, NKind kind, NIdentBase ident) : base(name, next) { Kind = kind; Ident = ident; }
public NMethod(string name, NIdentBase next, IEnumerable <NBase> args = null) : base(name, next) { Args = new List <NBase>(args ?? new NBase[] { }); }
public NIdent(string name, NIdentBase next) : base(name, next) { }
public NExprIdent(NBase expr, NIdentBase next) : base("expr", next) { Expr = expr; }
public NIdentBase(string name, NIdentBase next) { Name = name; Next = next; }