MCPcopy Create free account
hub / github.com/foxcpp/maddy / SyntaxErr

Method SyntaxErr

framework/config/lexer/dispenser.go:234–237  ·  view source on GitHub ↗

SyntaxErr creates a generic syntax error which explains what was found and what was expected.

(expected string)

Source from the content-addressed store, hash-verified

232// SyntaxErr creates a generic syntax error which explains what was
233// found and what was expected.
234func (d *Dispenser) SyntaxErr(expected string) error {
235 msg := fmt.Sprintf("%s:%d - Syntax error: Unexpected token '%s', expecting '%s'", d.File(), d.Line(), d.Val(), expected)
236 return errors.New(msg)
237}
238
239// EOFErr returns an error indicating that the dispenser reached
240// the end of the input when searching for the next token.

Callers 1

readNodeMethod · 0.80

Calls 3

FileMethod · 0.95
LineMethod · 0.95
ValMethod · 0.95

Tested by

no test coverage detected