MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / lastToken

Method lastToken

pkg/sql/plpgsql/parser/lexer.go:568–581  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566}
567
568func (l *lexer) lastToken() plpgsqlSymType {
569 if l.lastPos < 0 {
570 return plpgsqlSymType{}
571 }
572
573 if l.lastPos >= len(l.tokens) {
574 return plpgsqlSymType{
575 id: 0,
576 pos: int32(len(l.in)),
577 str: "EOF",
578 }
579 }
580 return l.tokens[l.lastPos]
581}
582
583// SetStmt is called from the parser when the statement is constructed.
584func (l *lexer) SetStmt(stmt plpgsqltree.Statement) {

Callers 3

setErrMethod · 0.95
ErrorMethod · 0.95
UnimplementedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected