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

Method getStr

pkg/sql/plpgsql/parser/lexer.go:517–527  ·  view source on GitHub ↗
(startPos, endPos int)

Source from the content-addressed store, hash-verified

515}
516
517func (l *lexer) getStr(startPos, endPos int) string {
518 if endPos <= startPos {
519 return ""
520 }
521 end := len(l.in)
522 if endPos < len(l.tokens) {
523 end = int(l.tokens[endPos].Pos())
524 }
525 start := int(l.tokens[startPos].Pos())
526 return l.in[start:end]
527}
528
529// Peek peeks
530func (l *lexer) Peek() plpgsqlSymType {

Callers 6

MakeExecSqlStmtMethod · 0.95
ParseReturnExprMethod · 0.95
ParseReturnQueryMethod · 0.95
ReadSqlExprMethod · 0.95
ReadSqlStatementMethod · 0.95
readTargetMethod · 0.95

Calls 1

PosMethod · 0.65

Tested by

no test coverage detected