MCPcopy Create free account
hub / github.com/andeya/algorithm / lexNumber

Function lexNumber

go-symexpr/lexer.go:368–375  ·  view source on GitHub ↗

lexNumber scans a number: decimal, octal, hex, float, or imaginary. This isn't a perfect number scanner - for instance it accepts "." and "0x0.2" and "089" - but when it's wrong the input is invalid and the parser (via strconv) will notice.

(l *lexer)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

scanNumberMethod · 0.80
errorfMethod · 0.80
emitMethod · 0.80

Tested by

no test coverage detected