예제 #1
0
 internal void AddDiagnostic(object node, Antlr4RoslynErrorCode code, params object[] args)
 {
     if (node is ParserRuleContext)
     {
         this.AddDiagnostic((ParserRuleContext)node, code, args);
     }
     else if (node is ITerminalNode)
     {
         this.AddDiagnostic((ParserRuleContext)node, code, args);
     }
     else
     {
         this.AddDiagnostic(code, args);
     }
 }
예제 #2
0
 internal void AddDiagnostic(Antlr4RoslynErrorCode code, params object[] args)
 {
     this.DiagnosticBag.Add(code, Location.Create(this.InputFilePath, default, default), args);