MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / parseIdent

Method parseIdent

pkg/sql/parser/parser.go:961–970  ·  view source on GitHub ↗

parseIdent parses an identifier

()

Source from the content-addressed store, hash-verified

959
960// parseIdent parses an identifier
961func (p *Parser) parseIdent() *ast.Identifier {
962 // Accept both regular identifiers and double-quoted identifiers
963 if !p.isType(models.TokenTypeIdentifier) && !p.isType(models.TokenTypeDoubleQuotedString) {
964 return nil
965 }
966 pos := p.currentLocation()
967 ident := &ast.Identifier{Name: p.currentToken.Token.Value, Pos: pos}
968 p.advance()
969 return ident
970}
971
972// parseIdentAsString parses an identifier and returns its name as a string
973func (p *Parser) parseIdentAsString() string {

Calls 3

isTypeMethod · 0.95
currentLocationMethod · 0.95
advanceMethod · 0.95

Tested by

no test coverage detected