MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / Limit_stmt

Method Limit_stmt

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

Source from the content-addressed store, hash-verified

25760}
25761
25762func (p *SQLiteParser) Limit_stmt() (localctx ILimit_stmtContext) {
25763 localctx = NewLimit_stmtContext(p, p.GetParserRuleContext(), p.GetState())
25764 p.EnterRule(localctx, 136, SQLiteParserRULE_limit_stmt)
25765 var _la int
25766
25767 p.EnterOuterAlt(localctx, 1)
25768 {
25769 p.SetState(1915)
25770 p.Match(SQLiteParserLIMIT_)
25771 if p.HasError() {
25772 // Recognition error - abort rule
25773 goto errorExit
25774 }
25775 }
25776 {
25777 p.SetState(1916)
25778 p.expr(0)
25779 }
25780 p.SetState(1919)
25781 p.GetErrorHandler().Sync(p)
25782 if p.HasError() {
25783 goto errorExit
25784 }
25785 _la = p.GetTokenStream().LA(1)
25786
25787 if _la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_ {
25788 {
25789 p.SetState(1917)
25790 _la = p.GetTokenStream().LA(1)
25791
25792 if !(_la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_) {
25793 p.GetErrorHandler().RecoverInline(p)
25794 } else {
25795 p.GetErrorHandler().ReportMatch(p)
25796 p.Consume()
25797 }
25798 }
25799 {
25800 p.SetState(1918)
25801 p.expr(0)
25802 }
25803
25804 }
25805
25806errorExit:
25807 if p.HasError() {
25808 v := p.GetError()
25809 localctx.SetException(v)
25810 p.GetErrorHandler().ReportError(p, v)
25811 p.GetErrorHandler().Recover(p, v)
25812 p.SetError(nil)
25813 }
25814 p.ExitRule()
25815 return localctx
25816 goto errorExit // Trick to prevent compiler error if the label is not used
25817}
25818
25819// IOrdering_termContext is an interface to support dynamic dispatch.

Callers 5

Delete_stmt_limitedMethod · 0.95
Select_stmtMethod · 0.95
Simple_select_stmtMethod · 0.95
Compound_select_stmtMethod · 0.95
Update_stmt_limitedMethod · 0.95

Calls 4

exprMethod · 0.95
NewLimit_stmtContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected