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); }
public void NotifyOptionsChanged(ILexerOptions lexerOptions) { try { // If checks need to be made _optionsChanged.OnNext(lexerOptions); } catch (Exception exception) { _optionsChanged.OnError(exception); } }
protected override void OnOptionsChanged(ILexerOptions lexerOptions) { Reset(); }
public StepLexer(IParser parser, IGrammarContainer grammarContainer, ReactiveList <SourceCodeLine> sourceLines, ILexerOptions lexerOptions) : base(parser, grammarContainer, sourceLines, lexerOptions) { }
protected abstract void OnOptionsChanged(ILexerOptions lexerOptions);
protected void OptionsChangedSubscriptionRegister(IScheduler scheduler, ILexerOptions lexerOptions) { _optionsChangedSubstription = lexerOptions.OptionsChanged.Subscribe(OnOptionsChanged, OnOptionsChangedError); }