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

Function readComment

rel/parse_sql.go:132–149  ·  view source on GitHub ↗
(p expr.TokenPager)

Source from the content-addressed store, hash-verified

130}
131
132func readComment(p expr.TokenPager) string {
133
134 comment := ""
135
136 for {
137 // We are going to loop until we find the first Non-Comment Token
138 switch p.Cur().T {
139 case lex.TokenComment, lex.TokenCommentML:
140 comment += p.Cur().V
141 case lex.TokenCommentStart, lex.TokenCommentHash, lex.TokenCommentEnd, lex.TokenCommentSingleLine, lex.TokenCommentSlashes:
142 // skip, currently ignore these
143 default:
144 // first non-comment token
145 return comment
146 }
147 p.Next()
148 }
149}
150
151func discardComments(m expr.TokenPager) {
152

Callers 2

parseMethod · 0.85
parseColumnsFunction · 0.85

Calls 2

CurMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected