()
| 4610 | } |
| 4611 | |
| 4612 | func (p *GScriptParser) BlockStatement() (localctx IBlockStatementContext) { |
| 4613 | localctx = NewBlockStatementContext(p, p.GetParserRuleContext(), p.GetState()) |
| 4614 | p.EnterRule(localctx, 54, GScriptParserRULE_blockStatement) |
| 4615 | |
| 4616 | defer func() { |
| 4617 | p.ExitRule() |
| 4618 | }() |
| 4619 | |
| 4620 | defer func() { |
| 4621 | if err := recover(); err != nil { |
| 4622 | if v, ok := err.(antlr.RecognitionException); ok { |
| 4623 | localctx.SetException(v) |
| 4624 | p.GetErrorHandler().ReportError(p, v) |
| 4625 | p.GetErrorHandler().Recover(p, v) |
| 4626 | } else { |
| 4627 | panic(err) |
| 4628 | } |
| 4629 | } |
| 4630 | }() |
| 4631 | |
| 4632 | p.SetState(295) |
| 4633 | p.GetErrorHandler().Sync(p) |
| 4634 | switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 31, p.GetParserRuleContext()) { |
| 4635 | case 1: |
| 4636 | localctx = NewBlockVarDeclarContext(p, localctx) |
| 4637 | p.EnterOuterAlt(localctx, 1) |
| 4638 | { |
| 4639 | p.SetState(289) |
| 4640 | p.VariableDeclarators() |
| 4641 | } |
| 4642 | { |
| 4643 | p.SetState(290) |
| 4644 | p.Match(GScriptParserT__0) |
| 4645 | } |
| 4646 | |
| 4647 | case 2: |
| 4648 | localctx = NewBlockStmContext(p, localctx) |
| 4649 | p.EnterOuterAlt(localctx, 2) |
| 4650 | { |
| 4651 | p.SetState(292) |
| 4652 | p.Statement() |
| 4653 | } |
| 4654 | |
| 4655 | case 3: |
| 4656 | localctx = NewBlockFuncContext(p, localctx) |
| 4657 | p.EnterOuterAlt(localctx, 3) |
| 4658 | { |
| 4659 | p.SetState(293) |
| 4660 | p.FunctionDeclaration() |
| 4661 | } |
| 4662 | |
| 4663 | case 4: |
| 4664 | localctx = NewBlockClassDeclarContext(p, localctx) |
| 4665 | p.EnterOuterAlt(localctx, 4) |
| 4666 | { |
| 4667 | p.SetState(294) |
| 4668 | p.ClassDeclaration() |
| 4669 | } |
no test coverage detected