public ICompilationUnitBase Parse(string fileName, string fileContent) { JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); Lexer lexer = new Lexer(new StringReader(fileContent)); p.Parse(lexer); JavaVisitor visitor = new JavaVisitor (); visitor.Visit(p.compilationUnit, null); visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0; visitor.Cu.Tag = p.compilationUnit; RetrieveRegions(visitor.Cu, lexer.SpecialTracker); return visitor.Cu; }
public ICompilationUnitBase Parse(string fileName) { Console.WriteLine ("*****"); JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); Lexer lexer = new Lexer(new FileReader(fileName)); p.Parse(lexer); JavaVisitor visitor = new JavaVisitor (); visitor.Visit(p.compilationUnit, null); visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0; RetrieveRegions(visitor.Cu, lexer.SpecialTracker); return visitor.Cu; }
public ICompilationUnitBase Parse(string fileName, string fileContent) { JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); Lexer lexer = new Lexer(new StringReader(fileContent)); p.Parse(lexer); JavaVisitor visitor = new JavaVisitor(); visitor.Visit(p.compilationUnit, null); visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0; visitor.Cu.Tag = p.compilationUnit; RetrieveRegions(visitor.Cu, lexer.SpecialTracker); return(visitor.Cu); }
public ICompilationUnitBase Parse(string fileName) { Console.WriteLine("*****"); JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); Lexer lexer = new Lexer(new FileReader(fileName)); p.Parse(lexer); JavaVisitor visitor = new JavaVisitor(); visitor.Visit(p.compilationUnit, null); visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0; RetrieveRegions(visitor.Cu, lexer.SpecialTracker); return(visitor.Cu); }