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

Method matchString

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

Source from the content-addressed store, hash-verified

228}
229
230func (p *Parser) matchString() (string, bool, error) {
231 l := p.lexer
232 ok, err := l.match('"')
233 if err != nil || !ok {
234 return "", false, noEOF(err)
235 }
236 s, err := l.scanString()
237 if err != nil {
238 return "", false, p.errorf("string literal: %s", err)
239 }
240 ok, err = l.match('"')
241 if err != nil {
242 return "", false, err
243 }
244 if !ok {
245 return "", false, p.error("mismatched string quotes")
246 }
247 return s, true, nil
248}
249
250func (p *Parser) matchNone() (*ast.None, error) {
251 l := p.lexer

Callers 2

matchStringPrimitiveMethod · 0.95
matchSymbolMethod · 0.95

Calls 5

errorfMethod · 0.95
errorMethod · 0.95
scanStringMethod · 0.80
noEOFFunction · 0.70
matchMethod · 0.45

Tested by

no test coverage detected