MCPcopy Index your code
hub / github.com/expr-lang/expr / error

Method error

parser/lexer/lexer.go:163–178  ·  view source on GitHub ↗
(format string, args ...any)

Source from the content-addressed store, hash-verified

161}
162
163func (l *Lexer) error(format string, args ...any) stateFn {
164 if l.err == nil { // show first error
165 end := l.end.rune
166 if l.eof {
167 end++
168 }
169 l.err = &file.Error{
170 Location: file.Location{
171 From: end - 1,
172 To: end,
173 },
174 Message: fmt.Sprintf(format, args...),
175 }
176 }
177 return nil
178}
179
180func digitVal(ch rune) int {
181 switch {

Callers 7

scanDigitsMethod · 0.95
scanEscapeMethod · 0.95
scanStringMethod · 0.95
scanRawStringMethod · 0.95
rootFunction · 0.45
numberFunction · 0.45
multiLineCommentFunction · 0.45

Calls 1

SprintfMethod · 0.80

Tested by

no test coverage detected