MCPcopy Create free account
hub / github.com/brimdata/super / ParseValue

Method ParseValue

sup/parser-values.go:17–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15)
16
17func (p *Parser) ParseValue() (ast.Value, error) {
18 v, err := p.matchValue()
19 if err == io.EOF {
20 err = nil
21 }
22 if v == nil && err == nil {
23 if err := p.lexer.check(1); err != nil && err != io.EOF {
24 return nil, fmt.Errorf("line %d: %w", p.lexer.line, err)
25 }
26 if len(p.lexer.cursor) > 0 {
27 return nil, fmt.Errorf("line %d: syntax error", p.lexer.line)
28 }
29 }
30 return v, err
31}
32
33func noEOF(err error) error {
34 if err == io.EOF {

Callers 5

ParseValueFunction · 0.95
UnmarshalMethod · 0.95
matchFieldMethod · 0.95
parseEntryMethod · 0.95
parseFunction · 0.45

Calls 2

matchValueMethod · 0.95
checkMethod · 0.45

Tested by 1

parseFunction · 0.36