java.lang.Object
io.cucumber.gherkin.GherkinTokenMatcher
- All Implemented Interfaces:
Parser.TokenMatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable Stringprivate final Map<String, KeywordMatcher> private KeywordMatcherprivate @Nullable Stringprivate final Stringprivate intprivate static final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate @Nullable KeywordMatcherfindKeywordMatcher(String language) booleanmatch_BackgroundLine(Token token) booleanmatch_Comment(Token token) booleanmatch_DocStringSeparator(Token token) private booleanmatch_DocStringSeparator(Token token, String separator, boolean isOpen) booleanmatch_Empty(Token token) booleanbooleanmatch_ExamplesLine(Token token) booleanmatch_FeatureLine(Token token) booleanmatch_Language(Token token) booleanmatch_Other(Token token) booleanmatch_RuleLine(Token token) booleanmatch_ScenarioLine(Token token) booleanmatch_StepLine(Token token) booleanmatch_TableRow(Token token) booleanmatch_TagLine(Token token) private booleanmatchTitleLine(Token token, Parser.TokenType tokenType, Function<Line, @Nullable KeywordMatcher.Match> matcher) private StringremoveDocStringIndent(Token token) voidreset()private voidsetLanguageMatched(String language, @Nullable io.cucumber.messages.types.Location location) private voidsetTokenMatched(Token token, Parser.TokenType matchedType, @Nullable String text, @Nullable String keyword, int indent, @Nullable io.cucumber.messages.types.StepKeywordType keywordType, @Nullable List<LineSpan> items) private StringunescapeDocString(String text)
-
Field Details
-
LANGUAGE_PATTERN
-
defaultLanguage
-
activeKeywordMatchers
-
currentLanguage
-
currentKeywordMatcher
-
activeDocStringSeparator
-
indentToRemove
private int indentToRemove
-
-
Constructor Details
-
GherkinTokenMatcher
GherkinTokenMatcher(String defaultLanguage) -
GherkinTokenMatcher
GherkinTokenMatcher()
-
-
Method Details
-
reset
public void reset()- Specified by:
resetin interfaceParser.TokenMatcher
-
setLanguageMatched
private void setLanguageMatched(String language, @Nullable io.cucumber.messages.types.Location location) throws ParserException - Throws:
ParserException
-
findKeywordMatcher
-
setTokenMatched
-
match_EOF
- Specified by:
match_EOFin interfaceParser.TokenMatcher
-
match_Other
- Specified by:
match_Otherin interfaceParser.TokenMatcher
-
match_Empty
- Specified by:
match_Emptyin interfaceParser.TokenMatcher
-
match_Comment
- Specified by:
match_Commentin interfaceParser.TokenMatcher
-
match_Language
- Specified by:
match_Languagein interfaceParser.TokenMatcher- Throws:
ParserException
-
match_TagLine
- Specified by:
match_TagLinein interfaceParser.TokenMatcher- Throws:
ParserException
-
match_FeatureLine
- Specified by:
match_FeatureLinein interfaceParser.TokenMatcher
-
match_RuleLine
- Specified by:
match_RuleLinein interfaceParser.TokenMatcher
-
match_BackgroundLine
- Specified by:
match_BackgroundLinein interfaceParser.TokenMatcher
-
match_ScenarioLine
- Specified by:
match_ScenarioLinein interfaceParser.TokenMatcher
-
match_ExamplesLine
- Specified by:
match_ExamplesLinein interfaceParser.TokenMatcher
-
matchTitleLine
private boolean matchTitleLine(Token token, Parser.TokenType tokenType, Function<Line, @Nullable KeywordMatcher.Match> matcher) -
match_DocStringSeparator
- Specified by:
match_DocStringSeparatorin interfaceParser.TokenMatcher
-
match_DocStringSeparator
-
match_StepLine
- Specified by:
match_StepLinein interfaceParser.TokenMatcher
-
match_TableRow
- Specified by:
match_TableRowin interfaceParser.TokenMatcher
-
removeDocStringIndent
-
unescapeDocString
-