parser

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2016 License: GPL-3.0, GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToStepText

func ConvertToStepText(fragments []*gauge_messages.Fragment) string

func CreateStepFromStepRequest

func CreateStepFromStepRequest(stepReq *gauge_messages.ExecuteStepRequest) *gauge.Step

func CreateStepValue

func CreateStepValue(step *gauge.Step) gauge.StepValue

func ExtractStepValueAndParams

func ExtractStepValueAndParams(stepText string, hasInlineTable bool) (*gauge.StepValue, error)

func GetUnescapedString

func GetUnescapedString(string1 string) string

func HandleParseResult

func HandleParseResult(results ...*ParseResult)

func PopulateConceptDynamicParams

func PopulateConceptDynamicParams(concept *gauge.Step, dataTableLookup *gauge.ArgLookup)

Creating a copy of the lookup and populating table values

func TableFrom

func TableFrom(protoTable *gauge_messages.ProtoTable) *gauge.Table

Types

type ConceptParser

type ConceptParser struct {
	// contains filtered or unexported fields
}

func (*ConceptParser) Parse

func (parser *ConceptParser) Parse(text string) ([]*gauge.Step, *ParseDetailResult)

concept file can have multiple concept headings

func (*ConceptParser) ParseFile added in v0.1.8

func (parser *ConceptParser) ParseFile(file string) ([]*gauge.Step, *ParseDetailResult)

type ParamResolver

type ParamResolver struct {
}

func (*ParamResolver) GetResolvedParams

func (paramResolver *ParamResolver) GetResolvedParams(step *gauge.Step, parent *gauge.Step, dataTableLookup *gauge.ArgLookup) []*gauge_messages.Parameter

type ParseDetailResult

type ParseDetailResult struct {
	Error    *ParseError
	Warnings []*Warning
}

func CreateStepUsingLookup added in v0.3.2

func CreateStepUsingLookup(stepToken *Token, lookup *gauge.ArgLookup) (*gauge.Step, *ParseDetailResult)

type ParseError

type ParseError struct {
	LineNo   int
	Message  string
	LineText string
}

func AddConcepts

func AddConcepts(conceptFile string, conceptDictionary *gauge.ConceptDictionary) *ParseError

func (*ParseError) Error

func (se *ParseError) Error() string

type ParseResult

type ParseResult struct {
	ParseError *ParseError
	Warnings   []*Warning
	Ok         bool
	FileName   string
}

func CreateConceptsDictionary

func CreateConceptsDictionary(shouldIgnoreErrors bool, dirs []string) (*gauge.ConceptDictionary, *ParseResult)

func FindSpecs

func FindSpecs(specSource string, conceptDictionary *gauge.ConceptDictionary) ([]*gauge.Specification, []*ParseResult)

func ParseSpecFiles

func ParseSpecFiles(specFiles []string, conceptDictionary *gauge.ConceptDictionary) ([]*gauge.Specification, []*ParseResult)

func (*ParseResult) Error

func (result *ParseResult) Error() string

type SpecParser

type SpecParser struct {
	// contains filtered or unexported fields
}

func (*SpecParser) CreateSpecification

func (parser *SpecParser) CreateSpecification(tokens []*Token, conceptDictionary *gauge.ConceptDictionary) (*gauge.Specification, *ParseResult)

func (*SpecParser) GenerateTokens

func (parser *SpecParser) GenerateTokens(specText string) ([]*Token, *ParseError)

func (*SpecParser) Parse

func (parser *SpecParser) Parse(specText string, conceptDictionary *gauge.ConceptDictionary) (*gauge.Specification, *ParseResult)

type Token

type Token struct {
	Kind     gauge.TokenKind
	LineNo   int
	LineText string
	Args     []string
	Value    string
}

func (*Token) String

func (token *Token) String() string

type Warning

type Warning struct {
	Message string
	LineNo  int
}

func (*Warning) String

func (warning *Warning) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL