Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// This parser rule is only used for line tokenisation
// it doesn't natively understand more context than a single line.
// It is also more forgiving than the normal parser.
onlyLine: WS? TAG lineTerm #lineTag
| WS? OPTION lineTerm #lineOpt
| WS? STEP_DEFINE DEF_WS? stepDeclaration? lineTerm #lineStepDefine
| WS? FEATURE WS? text? lineTerm #lineFeature
| WS? BACKGROUND lineTerm #lineBackground
| WS? SCENARIO WS? text? lineTerm #lineScenario
| WS? SCENARIO_OUTLINE WS? text? lineTerm #lineScenarioOutline
| WS? EXAMPLES lineTerm #lineExamples
| WS? tableRowCell+ CELL_DELIMITER #lineTableRow
| WS? GIVEN statementBody? lineTerm #lineGiven
| WS? WHEN statementBody? lineTerm #lineWhen
| WS? THEN statementBody? lineTerm #lineThen
| WS? AND statementBody? lineTerm #lineAnd
| WS? text? lineTerm #lineText
;
lineTerm: STATEMENT_NEWLINE
| DEF_NEWLINE
| ROW_NL
| WS? EOF;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.