Exemplo n.º 1
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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>();
        }
Exemplo n.º 5
0
        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();
        }