MCPcopy Create free account
hub / github.com/araddon/qlbridge / discardComments

Function discardComments

rel/parse_sql.go:151–167  ·  view source on GitHub ↗
(m expr.TokenPager)

Source from the content-addressed store, hash-verified

149}
150
151func discardComments(m expr.TokenPager) {
152
153 for {
154 // We are going to loop until we find the first Non-Comment Token
155 switch m.Cur().T {
156 case lex.TokenComment, lex.TokenCommentML,
157 lex.TokenCommentStart, lex.TokenCommentHash, lex.TokenCommentEnd,
158 lex.TokenCommentSingleLine, lex.TokenCommentSlashes:
159 // discard
160 m.Next()
161 default:
162 // first non-comment token
163 return
164 }
165
166 }
167}
168
169// First keyword was SELECT, so use the SELECT parser rule-set
170func (m *Sqlbridge) parseSqlSelect() (*SqlSelect, error) {

Callers 5

parseSqlSelectMethod · 0.85
parseCreateMethod · 0.85
parseDropMethod · 0.85
parseSourcesMethod · 0.85
parseCreateColsMethod · 0.85

Calls 2

CurMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected