MCPcopy
hub / github.com/kashav/fsql / currentError

Method currentError

parser/error.go:32–42  ·  view source on GitHub ↗

currentError returns the current error, based on the parser's current Token and the previously expected TokenType (set in parser.expect).

()

Source from the content-addressed store, hash-verified

30// currentError returns the current error, based on the parser's current Token
31// and the previously expected TokenType (set in parser.expect).
32func (p *parser) currentError() error {
33 if p.current == nil {
34 return io.ErrUnexpectedEOF
35 }
36
37 if p.current.Type == tokenizer.Unknown {
38 return &ErrUnknownToken{Raw: p.current.Raw}
39 }
40
41 return &ErrUnexpectedToken{Actual: p.current.Type, Expected: p.expected}
42}

Callers 8

parseSourceListMethod · 0.95
parseSelectClauseMethod · 0.95
parseFromClauseMethod · 0.95
parseWhereClauseMethod · 0.95
parseAttrsMethod · 0.95
parseAttrMethod · 0.95
parseConditionTreeMethod · 0.95
parseConditionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected