Example #1
0
 public void ToStringRelative(StringBuilder buf, SourcePos other)
 {
     if (this.Line == other.Line) {
     // "col <column>"
     buf.Append("col ");
     buf.Append(this.Column);
     } else {
     ToString(buf);
     }
 }
Example #2
0
        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));
        }
Example #3
0
 public string ToStringRelative(SourcePos other)
 {
     StringBuilder buf = new StringBuilder();
     ToStringRelative(buf, other);
     return buf.ToString();
 }
Example #4
0
 public VEntry(SourcePos SourcePos, string Name, Value Value)
     : base(SourcePos)
 {
     this.Name = Name;
     this.Value = Value;
 }
Example #5
0
File: Node.cs Project: cakoose/cks
 public Node(SourcePos SourcePos)
 {
     this.SourcePos = SourcePos;
 }
Example #6
0
 public Element(Value First, SourcePos ArrowPos, Value Second)
 {
     this.First = First;
     this.ArrowPos = ArrowPos;
     this.Second = Second;
 }
Example #7
0
 public Element(Value First)
 {
     this.First = First;
     this.ArrowPos = null;
     this.Second = null;
 }
Example #8
0
 public VCollection(SourcePos SourcePos, List<Element> Elements)
     : base(SourcePos)
 {
     this.Elements = Elements;
 }
Example #9
0
 public VRecord(SourcePos SourcePos, Dictionary<string,VEntry> Fields)
     : base(SourcePos)
 {
     this.Fields = Fields;
 }
Example #10
0
 private static ProblemException pex(SourcePos t1, string m1, SourcePos t2, string m2)
 {
     return new ProblemException(new Problem(t1, m1, t2, m2));
 }
Example #11
0
 private static ProblemException pex(Token t, string Message, SourcePos t2, string m2)
 {
     return new ProblemException(new Problem(t.SourcePos, Message, t2, m2));
 }
Example #12
0
 public String(SourcePos SourcePos, string Value)
     : base(SourcePos)
 {
     this.Value = Value;
 }
Example #13
0
 public Int(SourcePos SourcePos, BigInteger Value)
     : base(SourcePos)
 {
     this.Value = Value;
 }
Example #14
0
 public Bool(SourcePos SourcePos, bool Value)
     : base(SourcePos)
 {
     this.Value = Value;
 }
Example #15
0
 public VPrimitive(SourcePos SourcePos)
     : base(SourcePos)
 {
 }
Example #16
0
 public Void(SourcePos SourcePos)
     : base(SourcePos)
 {
 }