public LexicalAnalyzer() { var rootGrammer = new Grammer { Name = "Root" }; _syntaxTree = new Node <Grammer>(rootGrammer, null); }
private void CreateGrammerObjectAndAdd2SyntaxTree(string token, bool javascriptKeyword) { if (string.IsNullOrWhiteSpace(token)) { return; } var tokenGrammer = new Grammer { Name = token, JavascriptKeyword = javascriptKeyword }; _syntaxTree.AddChild(new Node <Grammer>(tokenGrammer, null)); }