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

Method matchFusion

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

Source from the content-addressed store, hash-verified

562}
563
564func (p *Parser) matchFusion(name string) (*ast.Fusion, error) {
565 if name != "fusion" {
566 return nil, nil
567 }
568 l := p.lexer
569 if ok, err := l.match('('); !ok || err != nil {
570 return nil, noEOF(err)
571 }
572 val, err := p.matchValue()
573 if err != nil {
574 return nil, noEOF(err)
575 }
576 if ok, err := l.match(','); !ok || err != nil {
577 return nil, noEOF(err)
578 }
579 tv, err := p.matchTypeValue()
580 if err != nil {
581 return nil, noEOF(err)
582 }
583 if ok, err := l.match(')'); !ok || err != nil {
584 return nil, noEOF(err)
585 }
586 return &ast.Fusion{
587 Kind: "Fusion",
588 Value: val,
589 Type: tv,
590 }, nil
591}
592
593func (p *Parser) matchTypeValue() (*ast.TypeValue, error) {
594 l := p.lexer

Callers 1

matchValueMethod · 0.95

Calls 4

matchValueMethod · 0.95
matchTypeValueMethod · 0.95
noEOFFunction · 0.70
matchMethod · 0.45

Tested by

no test coverage detected