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

Method Parse

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

Source from the content-addressed store, hash-verified

1663}
1664
1665func (p *SQLiteParser) Parse() (localctx IParseContext) {
1666 localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState())
1667 p.EnterRule(localctx, 0, SQLiteParserRULE_parse)
1668 var _la int
1669
1670 p.EnterOuterAlt(localctx, 1)
1671 p.SetState(233)
1672 p.GetErrorHandler().Sync(p)
1673 if p.HasError() {
1674 goto errorExit
1675 }
1676 _la = p.GetTokenStream().LA(1)
1677
1678 for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-6912461228224806910) != 0) || ((int64((_la-65)) & ^0x3f) == 0 && ((int64(1)<<(_la-65))&-8430175552450592503) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&2203651) != 0) {
1679 {
1680 p.SetState(230)
1681 p.Sql_stmt_list()
1682 }
1683
1684 p.SetState(235)
1685 p.GetErrorHandler().Sync(p)
1686 if p.HasError() {
1687 goto errorExit
1688 }
1689 _la = p.GetTokenStream().LA(1)
1690 }
1691 {
1692 p.SetState(236)
1693 p.Match(SQLiteParserEOF)
1694 if p.HasError() {
1695 // Recognition error - abort rule
1696 goto errorExit
1697 }
1698 }
1699
1700errorExit:
1701 if p.HasError() {
1702 v := p.GetError()
1703 localctx.SetException(v)
1704 p.GetErrorHandler().ReportError(p, v)
1705 p.GetErrorHandler().Recover(p, v)
1706 p.SetError(nil)
1707 }
1708 p.ExitRule()
1709 return localctx
1710 goto errorExit // Trick to prevent compiler error if the label is not used
1711}
1712
1713// ISql_stmt_listContext is an interface to support dynamic dispatch.
1714type ISql_stmt_listContext interface {

Callers 1

ParseMethod · 0.95

Calls 4

Sql_stmt_listMethod · 0.95
NewParseContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected