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; }
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); }
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(); } }