NewParserError is a convenience function to create a ParserError Warning: Highlight needs to be a subslice of Parser.data, so only slices returned by Parser.Raw are valid candidates.
(highlight []byte, format string, args ...interface{})
| 28 | // Warning: Highlight needs to be a subslice of Parser.data, so only slices |
| 29 | // returned by Parser.Raw are valid candidates. |
| 30 | func NewParserError(highlight []byte, format string, args ...interface{}) error { |
| 31 | return &ParserError{ |
| 32 | Highlight: highlight, |
| 33 | Message: fmt.Errorf(format, args...).Error(), |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | // Parser scans over a TOML-encoded document and generates an iterative AST. |
| 38 | // |
no test coverage detected
searching dependent graphs…