コード例 #1
0
ファイル: SourceFile.cs プロジェクト: TheByte/sones
 public SourceSpan(SourceLocation start, int length)
 {
     Start = start;
       Length = length;
 }
コード例 #2
0
ファイル: SourceFile.cs プロジェクト: TheByte/sones
 public static int Compare(SourceLocation x, SourceLocation y)
 {
     if (x.Position < y.Position) return -1;
       if (x.Position == y.Position) return 0;
       return 1;
 }
コード例 #3
0
ファイル: RuntimeException.cs プロジェクト: TheByte/sones
 public RuntimeException(String message, Exception inner, SourceLocation location)
     : base(message, inner)
 {
     Location = location;
 }
コード例 #4
0
ファイル: CodeOutlineFilter.cs プロジェクト: TheByte/sones
 private Token CreateSpecialToken(Terminal term, CompilerContext context, SourceLocation location)
 {
     return Token.Create(term, context, location, string.Empty);
 }
コード例 #5
0
ファイル: CompilerContext.cs プロジェクト: TheByte/sones
 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));
 }
コード例 #6
0
ファイル: CompilerContext.cs プロジェクト: TheByte/sones
 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;
 }
コード例 #7
0
ファイル: CompilerContext.cs プロジェクト: TheByte/sones
 public Token CreateErrorToken(SourceLocation location, string content)
 {
     return Token.Create(Grammar.SyntaxError, this, location, content);
 }