MCPcopy
hub / github.com/sqlc-dev/sqlc / Analyze_stmt

Method Analyze_stmt

internal/engine/sqlite/parser/sqlite_parser.go:3219–3283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3217}
3218
3219func (p *SQLiteParser) Analyze_stmt() (localctx IAnalyze_stmtContext) {
3220 localctx = NewAnalyze_stmtContext(p, p.GetParserRuleContext(), p.GetState())
3221 p.EnterRule(localctx, 8, SQLiteParserRULE_analyze_stmt)
3222 p.EnterOuterAlt(localctx, 1)
3223 {
3224 p.SetState(327)
3225 p.Match(SQLiteParserANALYZE_)
3226 if p.HasError() {
3227 // Recognition error - abort rule
3228 goto errorExit
3229 }
3230 }
3231 p.SetState(335)
3232 p.GetErrorHandler().Sync(p)
3233
3234 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 {
3235 {
3236 p.SetState(328)
3237 p.Schema_name()
3238 }
3239
3240 } else if p.HasError() { // JIM
3241 goto errorExit
3242 } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 2 {
3243 p.SetState(332)
3244 p.GetErrorHandler().Sync(p)
3245
3246 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 {
3247 {
3248 p.SetState(329)
3249 p.Schema_name()
3250 }
3251 {
3252 p.SetState(330)
3253 p.Match(SQLiteParserDOT)
3254 if p.HasError() {
3255 // Recognition error - abort rule
3256 goto errorExit
3257 }
3258 }
3259
3260 } else if p.HasError() { // JIM
3261 goto errorExit
3262 }
3263 {
3264 p.SetState(334)
3265 p.Table_or_index_name()
3266 }
3267
3268 } else if p.HasError() { // JIM
3269 goto errorExit
3270 }
3271
3272errorExit:
3273 if p.HasError() {
3274 v := p.GetError()
3275 localctx.SetException(v)
3276 p.GetErrorHandler().ReportError(p, v)

Callers 1

Sql_stmtMethod · 0.95

Calls 5

Schema_nameMethod · 0.95
Table_or_index_nameMethod · 0.95
NewAnalyze_stmtContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected