MCPcopy
hub / github.com/uber/aresdb / Scan

Method Scan

query/expr/scanner.go:45–51  ·  view source on GitHub ↗

Scan returns the next token and position from the underlying reader. Also returns the literal text read for strings, numbers, and duration tokens since these token types can have different literal representations.

()

Source from the content-addressed store, hash-verified

43// Also returns the literal text read for strings, numbers, and duration tokens
44// since these token types can have different literal representations.
45func (s *Scanner) Scan() (tok Token, pos Pos, lit string) {
46 tok, pos, lit = s.scan()
47 if tok != WS {
48 s.lastNonWSToken = tok
49 }
50 return
51}
52
53func (s *Scanner) scan() (tok Token, pos Pos, lit string) {
54 // Read next code point.

Callers 3

TestScanner_ScanFunction · 0.95
TestScanner_Scan_MultiFunction · 0.95
scanMethod · 0.45

Calls 1

scanMethod · 0.95

Tested by 2

TestScanner_ScanFunction · 0.76
TestScanner_Scan_MultiFunction · 0.76