private void FirstPass(LabelStore labelStore, MacroStore macroStore) { var instructionResolver = new InstructionResolver(labelStore, macroStore); var parser = new Parser(instructionResolver); parser.Parse(source); }
private string Suggest(string source, int cursorPosition) { var handler = new AutocompletionParserHandler(cursorPosition); var parser = new Parser(handler); parser.Parse(source); return handler.GetSuggestion(); }
private MemoryImage SecondPass(LabelStore labelStore, MacroStore macroStore) { labelStore.ClearReferencedLabels(); var instructionResolver = new InstructionResolver(labelStore, macroStore); var parser = new Parser(instructionResolver); parser.Parse(source); return instructionResolver.CreateMemoryImage(); }
public IList<ClassificationSpan> GetClassificationSpans(SnapshotSpan span) { var handler = new ClassificationParserHandler(span, classificationTypes); var parser = new Parser(handler); if (parser.Parse(span.GetText())) { return handler.Result; } return new List<ClassificationSpan>(); }
private int EvaluateExpression(string source, LabelStore labelStore) { var resolver = new ExpressionResolver(labelStore); var parser = new Parser(resolver); bool success = parser.ParseExpression(source); if (!success) { Assert.Inconclusive("Cannot parse expression " + source); } return resolver.Evaluate(); }
private string[] Parse(string source) { var handler = new TestParserHandler(); bool success = new Parser(handler).Parse(source); Assert.IsTrue(success, "Cannot parse: " + source); return handler.Result; }
private Label[] ResolveLabels(string source, LabelStore labelStore) { var resolver = new InstructionResolver(labelStore, new MacroStore()); var parser = new Parser(resolver); parser.Parse(source); return labelStore.ToArray(); }