Documentation ¶
Overview ¶
Package parser is license expression parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidExpression = xerrors.New("invalid expression error")
)
Functions ¶
This section is empty.
Types ¶
type LicenseExpression ¶
type LicenseExpression struct { Node Node Operator string Next *LicenseExpression }
type Node ¶
type Node struct { License string LicenseExpression *LicenseExpression }
type NormalizeFunc ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) Normalize ¶
func (p *Parser) Normalize(l *LicenseExpression) string
func (*Parser) Parse ¶
func (p *Parser) Parse() (*LicenseExpression, error)
func (*Parser) RegisterNormalizeFunc ¶
func (p *Parser) RegisterNormalizeFunc(fn ...NormalizeFunc) *Parser
Click to show internal directories.
Click to hide internal directories.