Package io.cucumber.gherkin
Class TokenScanner
- java.lang.Object
-
- io.cucumber.gherkin.TokenScanner
-
- All Implemented Interfaces:
Parser.ITokenScanner
public class TokenScanner extends Object implements Parser.ITokenScanner
The scanner reads a gherkin doc (typically read from a .feature file) and creates a token for each line. The tokens are passed to the parser, which outputs an AST (Abstract Syntax Tree).
If the scanner sees a # language header, it will reconfigure itself dynamically to look for Gherkin keywords for the associated language. The keywords are defined in gherkin-languages.json.
-
-
Constructor Summary
Constructors Constructor Description TokenScanner(Reader source)
TokenScanner(String source)
-
-
-
Method Detail
-
read
public Token read()
- Specified by:
read
in interfaceParser.ITokenScanner
-
-