validate

package
v0.456.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoValidate

func DoValidate(validateParams Params) error

func LoadGrammar

func LoadGrammar(grammarFile string, fs afero.Fs) (*sysl.Application, error)

LoadGrammar loads sysl conversion of given grammar. eg: if grammarFile is ./foo/bar.g, this tries to load ./foo/bar.sysl

Types

type Params

type Params struct {
	RootTransform string
	Transform     string
	Grammar       string
	DepPath       string
	Start         string
	BasePath      string
	Filesystem    afero.Fs
	Logger        *logrus.Logger
}

type Validator

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

func NewValidator

func NewValidator(grammar, transform *sysl.Application, parser *parse.Parser) *Validator

func (*Validator) GetMessages

func (v *Validator) GetMessages() map[string][]msg.Msg

func (*Validator) LogMessages

func (v *Validator) LogMessages()

func (*Validator) Validate

func (v *Validator) Validate(start, depPath, basepath string)

Jump to

Keyboard shortcuts

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