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

Function number

parser/lexer/state.go:72–78  ·  view source on GitHub ↗
(l *Lexer)

Source from the content-addressed store, hash-verified

70}
71
72func number(l *Lexer) stateFn {
73 if !l.scanNumber() {
74 return l.error("bad number syntax: %q", l.word())
75 }
76 l.emit(Number)
77 return root
78}
79
80func (l *Lexer) scanNumber() bool {
81 digits := "0123456789_"

Callers

nothing calls this directly

Calls 4

scanNumberMethod · 0.80
wordMethod · 0.80
errorMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…