internal static void AddError(CodeElement e, string message, Scanner.Token token, string rulestack = null, MessageCode code = MessageCode.SyntaxErrorInParser) { if (e.Diagnostics == null) { e.Diagnostics = new List <Diagnostic>(); } e.Diagnostics.Add(new ParserDiagnostic(message, token, rulestack, code)); }
private void button1_Click(object sender, EventArgs e) { var str = richTextBox1.Text; Scanner.Token c = new Scanner.Token(); c.getToken(str); richTextBox2.Text = c.slicer(c.GetText()); }
internal static void AddError(Node node, string message, Scanner.Token token, string rulestack = null, MessageCode code = MessageCode.SyntaxErrorInParser) { var diagnostic = new ParserDiagnostic(message, token, rulestack, code); node.AddDiagnostic(diagnostic); }