void TypeExpr(out NBase res) { res = null; string type = string.Empty; if (TokenEquals(1, NType.PrimitiveTypes)) { Expect(1); type = t.val; } else if (la.kind == 58) { Get(); Expect(1); type = t.val; if (la.kind == 6) { Get(); Expect(1); type = type + ":" + t.val; } } else { SynErr(74); } res = new NType(type, null, NType.NKind.Type, null); if (la.kind == 5) { Get(); ((NType)res).IsNullable = true; } }
public NCast(NKind kind, NBase value, NType type) : base(value) { Kind = kind; Type = type; }
public NNew(NType type, NIdentBase next, NArgs args = null) : base(type.Name, next) { Type = type; Args = args ?? new NArgs(); }