GetParseTree() public method

public GetParseTree ( VBComponent component ) : IParseTree
component VBComponent
return IParseTree
 private string Parse(string code)
 {
     var builder = new MockVbeBuilder();
     VBComponent component;
     var vbe = builder.BuildFromSingleStandardModule(code, out component);
     var mockHost = new Mock<IHostApplication>();
     mockHost.SetupAllProperties();
     var state = new RubberduckParserState();
     var parser = MockParser.Create(vbe.Object, state);
     parser.Parse();
     if (parser.State.Status == ParserState.Error) { Assert.Inconclusive("Parser Error"); }
     var tree = state.GetParseTree(component);
     var parsed = tree.GetText();
     var withoutEOF = parsed.Substring(0, parsed.Length - 5);
     return withoutEOF;
 }