()
| 10818 | } |
| 10819 | |
| 10820 | func (p *SqlBaseParser) Number() (localctx INumberContext) { |
| 10821 | localctx = NewNumberContext(p, p.GetParserRuleContext(), p.GetState()) |
| 10822 | p.EnterRule(localctx, 86, SqlBaseParserRULE_number) |
| 10823 | |
| 10824 | defer func() { |
| 10825 | p.ExitRule() |
| 10826 | }() |
| 10827 | |
| 10828 | defer func() { |
| 10829 | if err := recover(); err != nil { |
| 10830 | if v, ok := err.(antlr.RecognitionException); ok { |
| 10831 | localctx.SetException(v) |
| 10832 | p.GetErrorHandler().ReportError(p, v) |
| 10833 | p.GetErrorHandler().Recover(p, v) |
| 10834 | } else { |
| 10835 | panic(err) |
| 10836 | } |
| 10837 | } |
| 10838 | }() |
| 10839 | |
| 10840 | p.SetState(728) |
| 10841 | p.GetErrorHandler().Sync(p) |
| 10842 | |
| 10843 | switch p.GetTokenStream().LA(1) { |
| 10844 | case SqlBaseParserDECIMAL_VALUE: |
| 10845 | localctx = NewDecimalLiteralContext(p, localctx) |
| 10846 | p.EnterOuterAlt(localctx, 1) |
| 10847 | { |
| 10848 | p.SetState(725) |
| 10849 | p.Match(SqlBaseParserDECIMAL_VALUE) |
| 10850 | } |
| 10851 | |
| 10852 | case SqlBaseParserDOUBLE_VALUE: |
| 10853 | localctx = NewDoubleLiteralContext(p, localctx) |
| 10854 | p.EnterOuterAlt(localctx, 2) |
| 10855 | { |
| 10856 | p.SetState(726) |
| 10857 | p.Match(SqlBaseParserDOUBLE_VALUE) |
| 10858 | } |
| 10859 | |
| 10860 | case SqlBaseParserINTEGER_VALUE: |
| 10861 | localctx = NewIntegerLiteralContext(p, localctx) |
| 10862 | p.EnterOuterAlt(localctx, 3) |
| 10863 | { |
| 10864 | p.SetState(727) |
| 10865 | p.Match(SqlBaseParserINTEGER_VALUE) |
| 10866 | } |
| 10867 | |
| 10868 | default: |
| 10869 | panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) |
| 10870 | } |
| 10871 | |
| 10872 | return localctx |
| 10873 | } |
| 10874 | |
| 10875 | // INonReservedContext is an interface to support dynamic dispatch. |
| 10876 | type INonReservedContext interface { |
no test coverage detected