Versions in this module Expand all Collapse all v28 v28.0.0 Feb 15, 2024 Changes in this version + const CommentPrefix + const DefaultDialect + const DocstringAlternativeSeparator + const DocstringSeparator + const EscapeChar + const EscapedNewline + const TableCellSeparator + const TagPrefix + const TitleKeywordSeparator + func Messages(paths []string, decoder *json.Decoder, language string, includeSource bool, ...) ([]messages.Envelope, error) + func ParseGherkinDocument(in io.Reader, newId func() string) (gherkinDocument *messages.GherkinDocument, err error) + func ParseGherkinDocumentForLanguage(in io.Reader, language string, newId func() string) (gherkinDocument *messages.GherkinDocument, err error) + func Pickles(gherkinDocument messages.GherkinDocument, uri string, newId func() string) []*messages.Pickle + type AstBuilder interface + GetGherkinDocument func() *messages.GherkinDocument + func NewAstBuilder(newId func() string) AstBuilder + type Builder interface + Build func(*Token) (bool, error) + EndRule func(RuleType) (bool, error) + Reset func() + StartRule func(RuleType) (bool, error) + type Dialect struct + KeywordTypes map[string]messages.StepKeywordType + Keywords map[string][]string + Language string + Name string + Native string + func (g *Dialect) BackgroundKeywords() []string + func (g *Dialect) ExamplesKeywords() []string + func (g *Dialect) FeatureKeywords() []string + func (g *Dialect) RuleKeywords() []string + func (g *Dialect) ScenarioKeywords() []string + func (g *Dialect) ScenarioOutlineKeywords() []string + func (g *Dialect) StepKeywordType(keyword string) messages.StepKeywordType + func (g *Dialect) StepKeywords() []string + type DialectProvider interface + GetDialect func(language string) *Dialect + func DialectsBuiltin() DialectProvider + type Line struct + AtEof bool + LineNumber int + LineText string + TrimmedLineText string + func (g *Line) Indent() int + func (g *Line) IsEmpty() bool + func (g *Line) IsEof() bool + func (g *Line) StartsWith(prefix string) bool + type LineSpan struct + Column int + Text string + func (l *LineSpan) String() string + type Location struct + Column int + Line int + type Matcher interface + MatchBackgroundLine func(line *Line) (bool, *Token, error) + MatchComment func(line *Line) (bool, *Token, error) + MatchDocStringSeparator func(line *Line) (bool, *Token, error) + MatchEOF func(line *Line) (bool, *Token, error) + MatchEmpty func(line *Line) (bool, *Token, error) + MatchExamplesLine func(line *Line) (bool, *Token, error) + MatchFeatureLine func(line *Line) (bool, *Token, error) + MatchLanguage func(line *Line) (bool, *Token, error) + MatchOther func(line *Line) (bool, *Token, error) + MatchRuleLine func(line *Line) (bool, *Token, error) + MatchScenarioLine func(line *Line) (bool, *Token, error) + MatchStepLine func(line *Line) (bool, *Token, error) + MatchTableRow func(line *Line) (bool, *Token, error) + MatchTagLine func(line *Line) (bool, *Token, error) + Reset func() + func NewLanguageMatcher(gdp DialectProvider, language string) Matcher + func NewMatcher(gdp DialectProvider) Matcher + type Parser interface + Parse func(s Scanner, m Matcher) (err error) + StopAtFirstError func(b bool) + func NewParser(b Builder) Parser + type RuleType int + const RuleTypeBackground + const RuleTypeBackgroundLine + const RuleTypeComment + const RuleTypeDataTable + const RuleTypeDescription + const RuleTypeDescriptionHelper + const RuleTypeDocString + const RuleTypeDocStringSeparator + const RuleTypeEOF + const RuleTypeEmpty + const RuleTypeExamples + const RuleTypeExamplesDefinition + const RuleTypeExamplesLine + const RuleTypeExamplesTable + const RuleTypeFeature + const RuleTypeFeatureHeader + const RuleTypeFeatureLine + const RuleTypeGherkinDocument + const RuleTypeLanguage + const RuleTypeNone + const RuleTypeOther + const RuleTypeRule + const RuleTypeRuleHeader + const RuleTypeRuleLine + const RuleTypeScenario + const RuleTypeScenarioDefinition + const RuleTypeScenarioLine + const RuleTypeStep + const RuleTypeStepArg + const RuleTypeStepLine + const RuleTypeTableRow + const RuleTypeTagLine + const RuleTypeTags + func (t RuleType) IsEOF() bool + func (t RuleType) Name() string + type Scanner interface + Scan func() (line *Line, atEof bool, err error) + func NewScanner(r io.Reader) Scanner + type Token struct + GherkinDialect string + Indent string + Items []*LineSpan + Keyword string + KeywordType messages.StepKeywordType + Location *Location + Text string + Type TokenType + func (t *Token) IsEOF() bool + func (t *Token) String() string + type TokenType int + const TokenTypeBackgroundLine + const TokenTypeComment + const TokenTypeDocStringSeparator + const TokenTypeEOF + const TokenTypeEmpty + const TokenTypeExamplesLine + const TokenTypeFeatureLine + const TokenTypeLanguage + const TokenTypeNone + const TokenTypeOther + const TokenTypeRuleLine + const TokenTypeScenarioLine + const TokenTypeStepLine + const TokenTypeTableRow + const TokenTypeTagLine + func (t TokenType) Name() string + func (t TokenType) RuleType() RuleType Other modules containing this package github.com/cucumber/gherkin github.com/cucumber/gherkin/go/v26 github.com/cucumber/gherkin/go/v27 github.com/cucumber/gherkin/go/v29 github.com/cucumber/gherkin/go/v30