Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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),
                    };
 }
Esempio n. 3
0
 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)
                    };
 }
Esempio n. 4
0
 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),
                    };
 }
Esempio n. 5
0
        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)
                           };
        }
Esempio n. 6
0
 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),
                    };
 }
Esempio n. 7
0
 public CommentLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language)
     : base(parent, lineEnumerator, language)
 {
     this.listener = listener;
 }
Esempio n. 8
0
 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)
 {
 }
Esempio n. 10
0
 public UriLexer(Lexer parent, LineEnumerator lineEnumerator, IListener listener, Language language)
     : base(parent, lineEnumerator, listener, language)
 {
 }
Esempio n. 11
0
 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;
     }
 }
Esempio n. 12
0
 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);
 }