Esempio n. 1
0
 private void ReportError(SourceLocation location, string message, params object[] args)
 {
     if (args != null && args.Length > 0)
     message = string.Format(message, args);
       _context.AddError(location, message, _currentState);
 }
Esempio n. 2
0
 public SourceSpan(SourceLocation start, int length)
 {
     Start = start;
       Length = length;
 }
Esempio n. 3
0
 public static Token CreateSyntaxErrorToken(CompilerContext context, SourceLocation location, string message, params object[] args)
 {
     if (args != null && args.Length > 0)
     message = string.Format(message, args);
       return Token.Create(Grammar.SyntaxError, context, location, message);
 }
 private Token CreateSpecialToken(Terminal term, CompilerContext context, SourceLocation location)
 {
     return Token.Create(term, context, location, string.Empty);
 }
Esempio n. 5
0
 public void AddError(SourceLocation location, string message)
 {
     this.AddError(location, message, null);
 }
Esempio n. 6
0
 public void AddError(SourceLocation location, string message, ParserState state)
 {
     if (Errors.Count < 20) //just for now, 20 is max
     Errors.Add(new SyntaxError(location, message, state));
 }
Esempio n. 7
0
 public static Token Create(Terminal term, CompilerContext context, SourceLocation location, string text)
 {
     return(Create(term, context, location, text, text));
 }