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); }
public SourceSpan(SourceLocation start, int length) { Start = start; Length = length; }
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); }
public void AddError(SourceLocation location, string message) { this.AddError(location, message, null); }
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)); }
public static Token Create(Terminal term, CompilerContext context, SourceLocation location, string text) { return(Create(term, context, location, text, text)); }