forked from cucumber/gherkin-javascript
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIAstBuilder.ts
42 lines (27 loc) · 975 Bytes
/
IAstBuilder.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { IdGenerator, messages } from '@cucumber/messages'
import IToken from './IToken'
export interface IAstBuilder<AstNode, TokenType, RuleType> {
stack: AstNode[]
comments: messages.GherkinDocument.IComment[]
newId: IdGenerator.NewId
reset(): void
startRule(ruleType: RuleType): void
endRule(): void
build(token: IToken<TokenType>): void
getResult(): any
currentNode(): any
getLocation(token: IToken<TokenType>, column?: number): messages.ILocation
getTags(node: AstNode): readonly messages.GherkinDocument.Feature.ITag[]
getCells(
tableRowToken: IToken<TokenType>
): readonly messages.GherkinDocument.Feature.TableRow.ITableCell[]
getDescription(node: AstNode): any
getSteps(node: AstNode): any[]
getTableRows(
node: AstNode
): readonly messages.GherkinDocument.Feature.ITableRow[]
ensureCellCount(
rows: readonly messages.GherkinDocument.Feature.ITableRow[]
): void
transformNode(node: AstNode): any
}