コード例 #1
0
        public LexicalAnalyzer()
        {
            var rootGrammer = new Grammer
            {
                Name = "Root"
            };

            _syntaxTree = new Node <Grammer>(rootGrammer, null);
        }
コード例 #2
0
        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));
        }