Exemplo n.º 1
0
 public AbstractLexer(IScheduler scheduler, IParser parser, IGrammarContainer grammarContainer, ReactiveList <SourceCodeLine> sourceLines, ILexerOptions lexerOptions)
 {
     _parser = parser;
     CheckNextTokenSubscriptionRegister(scheduler, parser);
     GrammarChangeIdentifiedSubscriptionRegister(scheduler, parser);
     _grammarContainer = grammarContainer;
     _sourceLines      = sourceLines;
     SourceLinesChangedSubscriptionRegister(scheduler, sourceLines);
     _lexerOptions = lexerOptions;
     OptionsChangedSubscriptionRegister(scheduler, lexerOptions);
     _parser.RegisterLexer(scheduler, this);
 }
Exemplo n.º 2
0
        public void NotifyOptionsChanged(ILexerOptions lexerOptions)
        {
            try
            {
                // If checks need to be made

                _optionsChanged.OnNext(lexerOptions);
            }
            catch (Exception exception)
            {
                _optionsChanged.OnError(exception);
            }
        }
Exemplo n.º 3
0
 protected override void OnOptionsChanged(ILexerOptions lexerOptions)
 {
     Reset();
 }
Exemplo n.º 4
0
 public StepLexer(IParser parser, IGrammarContainer grammarContainer, ReactiveList <SourceCodeLine> sourceLines, ILexerOptions lexerOptions) : base(parser, grammarContainer, sourceLines, lexerOptions)
 {
 }
Exemplo n.º 5
0
 protected abstract void OnOptionsChanged(ILexerOptions lexerOptions);
Exemplo n.º 6
0
 protected void OptionsChangedSubscriptionRegister(IScheduler scheduler, ILexerOptions lexerOptions)
 {
     _optionsChangedSubstription = lexerOptions.OptionsChanged.Subscribe(OnOptionsChanged, OnOptionsChangedError);
 }