상속: SyntaxWalker
예제 #1
0
        public void EmitJs(TextWriter output, string content)
        {
            var tree = SyntaxTree.ParseCompilationUnit(content);

            var root = (CompilationUnitSyntax)tree.GetRoot();

            var emitter = new JavaScriptWalker(output);
            emitter.Visit(root);
        }
예제 #2
0
        public void EmitJs(TextWriter output, string content)
        {
            var tree = SyntaxTree.ParseText(content);

            var root = (CompilationUnitSyntax)tree.GetRoot();

            var emitter = new JavaScriptWalker(output);

            emitter.Visit(root);
        }
예제 #3
0
        private void Compile(TextWriter output, string content, string path)
        {
            var tree = SyntaxTree.ParseCompilationUnit(content, path);

            var root = (CompilationUnitSyntax)tree.GetRoot();

            var collector = new ClassCollector();
            collector.Visit(root);

            foreach (var @class in collector.Classes)
            {
                var emitter = new JavaScriptWalker(output);
                emitter.Visit(@class);
            }
        }
예제 #4
0
        private void Compile(TextWriter output, string content, string path)
        {
            var tree = SyntaxTree.ParseText(content, path);

            var root = (CompilationUnitSyntax)tree.GetRoot();

            var collector = new ClassCollector();

            collector.Visit(root);

            foreach (var @class in collector.Classes)
            {
                var emitter = new JavaScriptWalker(output);
                emitter.Visit(@class);
            }
        }