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

Method matchError

sup/parser-values.go:543–562  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

541}
542
543func (p *Parser) matchError(name string) (*ast.Error, error) {
544 if name != "error" {
545 return nil, nil
546 }
547 l := p.lexer
548 if ok, err := l.match('('); !ok || err != nil {
549 return nil, noEOF(err)
550 }
551 val, err := p.matchValue()
552 if err != nil {
553 return nil, noEOF(err)
554 }
555 if ok, err := l.match(')'); !ok || err != nil {
556 return nil, noEOF(err)
557 }
558 return &ast.Error{
559 Kind: "Error",
560 Value: val,
561 }, nil
562}
563
564func (p *Parser) matchFusion(name string) (*ast.Fusion, error) {
565 if name != "fusion" {

Callers 1

matchValueMethod · 0.95

Calls 3

matchValueMethod · 0.95
noEOFFunction · 0.70
matchMethod · 0.45

Tested by

no test coverage detected