()
| 541 | } |
| 542 | |
| 543 | func (p *GScriptParser) ClassDeclaration() (localctx IClassDeclarationContext) { |
| 544 | localctx = NewClassDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) |
| 545 | p.EnterRule(localctx, 0, GScriptParserRULE_classDeclaration) |
| 546 | var _la int |
| 547 | |
| 548 | defer func() { |
| 549 | p.ExitRule() |
| 550 | }() |
| 551 | |
| 552 | defer func() { |
| 553 | if err := recover(); err != nil { |
| 554 | if v, ok := err.(antlr.RecognitionException); ok { |
| 555 | localctx.SetException(v) |
| 556 | p.GetErrorHandler().ReportError(p, v) |
| 557 | p.GetErrorHandler().Recover(p, v) |
| 558 | } else { |
| 559 | panic(err) |
| 560 | } |
| 561 | } |
| 562 | }() |
| 563 | |
| 564 | p.EnterOuterAlt(localctx, 1) |
| 565 | { |
| 566 | p.SetState(86) |
| 567 | p.Match(GScriptParserCLASS) |
| 568 | } |
| 569 | { |
| 570 | p.SetState(87) |
| 571 | p.Match(GScriptParserIDENTIFIER) |
| 572 | } |
| 573 | p.SetState(90) |
| 574 | p.GetErrorHandler().Sync(p) |
| 575 | _la = p.GetTokenStream().LA(1) |
| 576 | |
| 577 | if _la == GScriptParserEXTENDS { |
| 578 | { |
| 579 | p.SetState(88) |
| 580 | p.Match(GScriptParserEXTENDS) |
| 581 | } |
| 582 | { |
| 583 | p.SetState(89) |
| 584 | p.TypeType() |
| 585 | } |
| 586 | |
| 587 | } |
| 588 | p.SetState(94) |
| 589 | p.GetErrorHandler().Sync(p) |
| 590 | _la = p.GetTokenStream().LA(1) |
| 591 | |
| 592 | if _la == GScriptParserIMPLEMENTS { |
| 593 | { |
| 594 | p.SetState(92) |
| 595 | p.Match(GScriptParserIMPLEMENTS) |
| 596 | } |
| 597 | { |
| 598 | p.SetState(93) |
| 599 | p.TypeList() |
| 600 | } |
no test coverage detected