Esempio n. 1
0
        static internal bool IsStepLine(SnapshotPoint triggerPoint, GherkinLanguageService languageService)
        {
            var keywordCandidate = GetFirstWord(triggerPoint);

            if (keywordCandidate == null)
            {
                return(false);
            }
            GherkinDialect dialect = GetDialect(languageService);

            if (dialect == null)
            {
                return(false);
            }

            if (dialect.IsStepKeyword(keywordCandidate))
            {
                return(true);
            }

            keywordCandidate = GetFirstTwoWords(triggerPoint);
            if (keywordCandidate == null)
            {
                return(false);
            }
            return(dialect.IsStepKeyword(keywordCandidate));
        }
        static internal bool IsStepLine(SnapshotPoint triggerPoint, GherkinLanguageService languageService)
        {
            var firstWord = GetFirstWord(triggerPoint);

            if (firstWord == null)
            {
                return(false);
            }
            GherkinDialect dialect = GetDialect(languageService);

            return(dialect.IsStepKeyword(firstWord));
        }