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); } }
internal void AddDiagnostic(Antlr4RoslynErrorCode code, params object[] args) { this.DiagnosticBag.Add(code, Location.Create(this.InputFilePath, default, default), args);