Пример #1
0
        public XElement Compile()
        {
            IList<Pair<string, string>> tokens = null;

            using (Tokenizer tokenizer = new Tokenizer(this.inputPath))
            {
                tokens = tokenizer.GetTokens();
            }

            tokens=  tokens.Where(t => t.Value1 != "Comment").ToList();

            CompilationEngine compilationEngine = new CompilationEngine(tokens);
            XElement xmlCompiledClass = compilationEngine.CompileClass();

            return xmlCompiledClass;
        }
Пример #2
0
        public XElement Compile()
        {
            IList <Pair <string, string> > tokens = null;

            using (Tokenizer tokenizer = new Tokenizer(this.inputPath))
            {
                tokens = tokenizer.GetTokens();
            }

            tokens = tokens.Where(t => t.Value1 != "Comment").ToList();

            CompilationEngine compilationEngine = new CompilationEngine(tokens);
            XElement          xmlCompiledClass  = compilationEngine.CompileClass();

            return(xmlCompiledClass);
        }
Пример #3
0
        public void Compile()
        {
            IList <Pair <string, string> > tokens = null;

            using (Tokenizer tokenizer = new Tokenizer(this.inputPath))
            {
                tokens = tokenizer.GetTokens();
            }

            tokens = tokens.Where(t => t.Value1 != "Comment").ToList();

            using (VmWriter vmWriter = new VmWriter(GetOutputPath()))
            {
                CompilationEngineVm compilationEngineVm = new CompilationEngineVm(tokens, vmWriter, Path.GetFileNameWithoutExtension(inputPath));
                compilationEngineVm.CompileClass();
            }
        }