MCPcopy Create free account
hub / github.com/Permify/permify / Error

Method Error

pkg/dsl/parser/parser.go:148–155  ·  view source on GitHub ↗

Error returns an error if there are any errors in the Parser's errors slice

()

Source from the content-addressed store, hash-verified

146
147// Error returns an error if there are any errors in the Parser's errors slice
148func (p *Parser) Error() error {
149 // if there are no errors, return nil
150 if len(p.errors) == 0 {
151 return nil
152 }
153 // if there are errors, return the first error message in the errors slice as an error type
154 return errors.New(p.errors[0])
155}
156
157// Parse reads and parses the input string and returns an AST representation of the schema, along with any errors encountered during parsing
158func (p *Parser) Parse() (*ast.Schema, error) {

Callers 15

ParseMethod · 0.95
ParsePartialMethod · 0.95
parseEntityStatementMethod · 0.95
parseRuleStatementMethod · 0.95
parseExpressionMethod · 0.95
parseInfixExpressionMethod · 0.95

Calls

no outgoing calls

Tested by 6

TestTupleIteratorFunction · 0.36
TestSubjectIteratorFunction · 0.36
TestUniqueTupleIteratorFunction · 0.36
TestAttributeIteratorFunction · 0.36
TestEntityIteratorFunction · 0.36