parser

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 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) bool

func ParseSpecs added in v0.6.2

func ParseSpecs(args []string, conceptsDictionary *gauge.ConceptDictionary) ([]*gauge.Specification, bool)

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, fileName string) ([]*gauge.Step, *ParseResult)

concept file can have multiple concept headings

func (*ConceptParser) ParseFile added in v0.1.8

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

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 ParseError

type ParseError struct {
	FileName string
	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 {
	ParseErrors    []*ParseError
	CriticalErrors []*ParseError
	Warnings       []*Warning
	Ok             bool
	FileName       string
}

func CreateConceptsDictionary

func CreateConceptsDictionary() (*gauge.ConceptDictionary, *ParseResult)

func CreateStepUsingLookup added in v0.3.2

func CreateStepUsingLookup(stepToken *Token, lookup *gauge.ArgLookup, specFileName string) (*gauge.Step, *ParseResult)

func ParseConcepts added in v0.6.2

func ParseConcepts() (*gauge.ConceptDictionary, *ParseResult)

func ParseSpecFiles

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

func (*ParseResult) Errors added in v0.5.0

func (result *ParseResult) Errors() []string

type SpecParser

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

func (*SpecParser) CreateSpecification

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

func (*SpecParser) GenerateTokens

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

func (*SpecParser) Parse

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

type Token

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

func (*Token) String

func (token *Token) String() string

type Warning

type Warning struct {
	FileName string
	LineNo   int
	Message  string
}

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