Beispiel #1
0
 public SourceSpan(SourceLocation start, int length)
 {
   Start = start;
   Length = length;
 }
Beispiel #2
0
 public static TokenAst CreateSyntaxErrorToken(CompilerContext context, SourceLocation location, string message, params object[] args)
 {
   if (args != null && args.Length > 0)
     message = string.Format(message, args);
   return TokenAst.Create(Grammar.SyntaxError, context, location, message);
 }
Beispiel #3
0
 public void AddError(SourceLocation location, string message, ParserState state)
 {
   Errors.Add(new SyntaxError(location, message, state));
 }
Beispiel #4
0
 public SyntaxError(SourceLocation location, string message, ParserState state)
 {
   Location = location;
   Message = message;
   State = state;
 }
Beispiel #5
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);
 }