protected Lexer(Lexer parent, LineEnumerator lineEnumerator, Language language) { this.parent = parent; LineEnumerator = lineEnumerator; Language = language; //TODO: Should probably unsubscribe to event at some point Language.LanguageChanged += ChangeLanguage; SetupRegex(); }
public BackgroundLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, language) { this.listener = listener; children = new Lexer[] { new CommentLexer(this, lineEnumerator, listener, language), new StepLexer(this, lineEnumerator, listener, language), }; }
public ExampleLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, language) { this.listener = listener; children = new Lexer[] { new RowLexer(this, lineEnumerator, listener, language), new CommentLexer(this, lineEnumerator, listener, language), new UriLexer(this, lineEnumerator, listener, language) }; }
public StartLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, language) { children = new Lexer[] { new FeatureLexer(this, lineEnumerator, listener, language), new TagLexer(this, lineEnumerator, listener, language), new CommentLexer(this, lineEnumerator, listener, language), new ScenarioLexer(this, lineEnumerator, listener, language), }; }
public ScenarioLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, language) { Listener = listener; children = new Lexer[] { new StepLexer(this, lineEnumerator, listener, language), new ExampleLexer(this, lineEnumerator, listener, language), new CommentLexer(this, lineEnumerator, listener, language) }; }
public FeatureLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, language) { this.listener = listener; children = new Lexer[] { new ScenarioLexer(this, lineEnumerator, listener, language), new CommentLexer(this, lineEnumerator, listener, language), new ScenarioOutlineLexer(this, lineEnumerator, listener, language), new BackgroundLexer(this, lineEnumerator, listener, language), new TagLexer(this, lineEnumerator, listener, language), }; }
public CommentLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, language) { this.listener = listener; }
public LexerForTokenWord(Lexer lexer, string tokenWord) { Lexer = lexer; TokenWord = tokenWord; }
public ScenarioOutlineLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, listener, language) { }
public UriLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language) : base(parent, lineEnumerator, listener, language) { }
private void ReadMultiLineStep(Lexer parentLexer, LineMatch lineMatch) { if (CanSpanMultipleLines && NextLineIsStep(parentLexer) == false && NextLineIsChildStep(lineMatch) == false) { string moreTitle = GetStepText(); lineMatch.Text = (string.IsNullOrEmpty(moreTitle)) ? lineMatch.Text : lineMatch.Text + lineMatch.ParsedLine.LineEnd + moreTitle; } }
private bool NextLineIsStep(Lexer lexer) { if (LineEnumerator.HasMore == false) return false; LineEnumerator.MoveToNext(); var lineMatch = lexer.LineMatcher.Match(LineEnumerator.Current); LineEnumerator.MoveToPrevious(); return (lineMatch != null); }