()
| 3790 | } |
| 3791 | |
| 3792 | func (p *GScriptParser) Literal() (localctx ILiteralContext) { |
| 3793 | localctx = NewLiteralContext(p, p.GetParserRuleContext(), p.GetState()) |
| 3794 | p.EnterRule(localctx, 44, GScriptParserRULE_literal) |
| 3795 | |
| 3796 | defer func() { |
| 3797 | p.ExitRule() |
| 3798 | }() |
| 3799 | |
| 3800 | defer func() { |
| 3801 | if err := recover(); err != nil { |
| 3802 | if v, ok := err.(antlr.RecognitionException); ok { |
| 3803 | localctx.SetException(v) |
| 3804 | p.GetErrorHandler().ReportError(p, v) |
| 3805 | p.GetErrorHandler().Recover(p, v) |
| 3806 | } else { |
| 3807 | panic(err) |
| 3808 | } |
| 3809 | } |
| 3810 | }() |
| 3811 | |
| 3812 | p.SetState(273) |
| 3813 | p.GetErrorHandler().Sync(p) |
| 3814 | |
| 3815 | switch p.GetTokenStream().LA(1) { |
| 3816 | case GScriptParserDECIMAL_LITERAL: |
| 3817 | p.EnterOuterAlt(localctx, 1) |
| 3818 | { |
| 3819 | p.SetState(267) |
| 3820 | p.Match(GScriptParserDECIMAL_LITERAL) |
| 3821 | } |
| 3822 | |
| 3823 | case GScriptParserFLOAT_LITERAL: |
| 3824 | p.EnterOuterAlt(localctx, 2) |
| 3825 | { |
| 3826 | p.SetState(268) |
| 3827 | p.Match(GScriptParserFLOAT_LITERAL) |
| 3828 | } |
| 3829 | |
| 3830 | case GScriptParserSTRING_LITERAL, GScriptParserRAW_STRING_LIT: |
| 3831 | p.EnterOuterAlt(localctx, 3) |
| 3832 | { |
| 3833 | p.SetState(269) |
| 3834 | p.String_() |
| 3835 | } |
| 3836 | |
| 3837 | case GScriptParserBOOL_LITERAL: |
| 3838 | p.EnterOuterAlt(localctx, 4) |
| 3839 | { |
| 3840 | p.SetState(270) |
| 3841 | p.Match(GScriptParserBOOL_LITERAL) |
| 3842 | } |
| 3843 | |
| 3844 | case GScriptParserNULL_LITERAL: |
| 3845 | p.EnterOuterAlt(localctx, 5) |
| 3846 | { |
| 3847 | p.SetState(271) |
| 3848 | p.Match(GScriptParserNULL_LITERAL) |
| 3849 | } |
no test coverage detected