Esempio n. 1
0
 /// <summary>
 /// Report a syntax error encountered during scan of the source code.
 /// </summary>
 /// <param name="token">Token responsible for the problem.</param>
 /// <param name="startPosition">Source code start position.</param>
 /// <param name="stopPosition">source code end position.</param>
 /// <param name="scanErrorMessage">Scan error message because of source code syntax error.</param>   
 void LexicalAnalysis.IScanErrorSink.AddScanError(LexicalTokens.IToken token, SourceLocation startPosition, SourceLocation stopPosition, string scanErrorMessage)
 {
     startPosition = this.TranslateSourcePosition(startPosition);
     stopPosition = this.TranslateSourcePosition(stopPosition);
     if (this.Processor.ErrorSink != null)
         this.Processor.ErrorSink.AddScanError(token, startPosition, stopPosition, scanErrorMessage);
 }
Esempio n. 2
0
 /// <summary>
 /// Report a semantical error encountered during parsing of the source code.
 /// </summary>
 /// <param name="node">Parse node responsible / signaling the error.</param>
 /// <param name="startPosition">Source code start position.</param>
 /// <param name="stopPosition">source code end position.</param>
 /// <param name="parseErrorMessage">Parse error message because of source code semantical error.</param>
 /// <param name="offendingToken">Token responsible for the problem.</param>
 void IParseErrorSink.AddParserError(SemanticNodes.IParseNode node, SourceLocation startPosition, SourceLocation stopPosition, string parseErrorMessage, LexicalTokens.IToken offendingToken)
 {
     startPosition = this.TranslateSourcePosition(startPosition);
     stopPosition = this.TranslateSourcePosition(stopPosition);
     if (this.Processor.ErrorSink != null)
         this.Processor.ErrorSink.AddParserError(node, startPosition, stopPosition, parseErrorMessage, offendingToken);
 }