public void ToStringRelative(StringBuilder buf, SourcePos other) { if (this.Line == other.Line) { // "col <column>" buf.Append("col "); buf.Append(this.Column); } else { ToString(buf); } }
private void AddEntry(Dictionary<string,VEntry> Entries, SourcePos Loc, string Name, Value Value) { VEntry Displaced; Entries.TryGetValue(Name, out Displaced); if (Displaced != null) { throw pex(Loc, "duplicate definition of \"" + Name + "\"", Displaced.SourcePos, "original definition"); } Entries.Add(Name, new VEntry(Loc, Name, Value)); }
public string ToStringRelative(SourcePos other) { StringBuilder buf = new StringBuilder(); ToStringRelative(buf, other); return buf.ToString(); }
public VEntry(SourcePos SourcePos, string Name, Value Value) : base(SourcePos) { this.Name = Name; this.Value = Value; }
public Node(SourcePos SourcePos) { this.SourcePos = SourcePos; }
public Element(Value First, SourcePos ArrowPos, Value Second) { this.First = First; this.ArrowPos = ArrowPos; this.Second = Second; }
public Element(Value First) { this.First = First; this.ArrowPos = null; this.Second = null; }
public VCollection(SourcePos SourcePos, List<Element> Elements) : base(SourcePos) { this.Elements = Elements; }
public VRecord(SourcePos SourcePos, Dictionary<string,VEntry> Fields) : base(SourcePos) { this.Fields = Fields; }
private static ProblemException pex(SourcePos t1, string m1, SourcePos t2, string m2) { return new ProblemException(new Problem(t1, m1, t2, m2)); }
private static ProblemException pex(Token t, string Message, SourcePos t2, string m2) { return new ProblemException(new Problem(t.SourcePos, Message, t2, m2)); }
public String(SourcePos SourcePos, string Value) : base(SourcePos) { this.Value = Value; }
public Int(SourcePos SourcePos, BigInteger Value) : base(SourcePos) { this.Value = Value; }
public Bool(SourcePos SourcePos, bool Value) : base(SourcePos) { this.Value = Value; }
public VPrimitive(SourcePos SourcePos) : base(SourcePos) { }
public Void(SourcePos SourcePos) : base(SourcePos) { }