Ejemplo n.º 1
0
 public SourceSpan(SourceLocation start, int length)
 {
     Start = start;
       Length = length;
 }
Ejemplo n.º 2
0
 public static int Compare(SourceLocation x, SourceLocation y)
 {
     if (x.Position < y.Position) return -1;
       if (x.Position == y.Position) return 0;
       return 1;
 }
Ejemplo n.º 3
0
 public RuntimeException(String message, Exception inner, SourceLocation location)
     : base(message, inner)
 {
     Location = location;
 }
Ejemplo n.º 4
0
 private Token CreateSpecialToken(Terminal term, CompilerContext context, SourceLocation location)
 {
     return Token.Create(term, context, location, string.Empty);
 }
Ejemplo n.º 5
0
 public void ReportError(SourceLocation location, string message, params object[] args)
 {
     if (Errors.Count >= MaxErrors) return;
       if (args != null && args.Length > 0)
     message = string.Format(message, args);
       Errors.Add(new SyntaxError(location, message));
 }
Ejemplo n.º 6
0
 public Token CreateErrorTokenAndReportError(SourceLocation location, string content, string message, params object[] args)
 {
     ReportError(location, message, args);
       Token result = Token.Create(Grammar.SyntaxError, this, location, content);
       return result;
 }
Ejemplo n.º 7
0
 public Token CreateErrorToken(SourceLocation location, string content)
 {
     return Token.Create(Grammar.SyntaxError, this, location, content);
 }