()
| 7538 | } |
| 7539 | |
| 7540 | func (p *GScriptParser) FunctionType() (localctx IFunctionTypeContext) { |
| 7541 | localctx = NewFunctionTypeContext(p, p.GetParserRuleContext(), p.GetState()) |
| 7542 | p.EnterRule(localctx, 76, GScriptParserRULE_functionType) |
| 7543 | var _la int |
| 7544 | |
| 7545 | defer func() { |
| 7546 | p.ExitRule() |
| 7547 | }() |
| 7548 | |
| 7549 | defer func() { |
| 7550 | if err := recover(); err != nil { |
| 7551 | if v, ok := err.(antlr.RecognitionException); ok { |
| 7552 | localctx.SetException(v) |
| 7553 | p.GetErrorHandler().ReportError(p, v) |
| 7554 | p.GetErrorHandler().Recover(p, v) |
| 7555 | } else { |
| 7556 | panic(err) |
| 7557 | } |
| 7558 | } |
| 7559 | }() |
| 7560 | |
| 7561 | p.EnterOuterAlt(localctx, 1) |
| 7562 | { |
| 7563 | p.SetState(468) |
| 7564 | p.Match(GScriptParserFUNCTION) |
| 7565 | } |
| 7566 | p.SetState(470) |
| 7567 | p.GetErrorHandler().Sync(p) |
| 7568 | _la = p.GetTokenStream().LA(1) |
| 7569 | |
| 7570 | if (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<GScriptParserINT)|(1<<GScriptParserSTRING)|(1<<GScriptParserFLOAT)|(1<<GScriptParserBOOLEAN)|(1<<GScriptParserBYTE)|(1<<GScriptParserANY))) != 0) || (((_la-48)&-(0x1f+1)) == 0 && ((1<<uint((_la-48)))&((1<<(GScriptParserFUNCTION-48))|(1<<(GScriptParserVOID-48))|(1<<(GScriptParserIDENTIFIER-48)))) != 0) { |
| 7571 | { |
| 7572 | p.SetState(469) |
| 7573 | p.TypeTypeOrVoid() |
| 7574 | } |
| 7575 | |
| 7576 | } |
| 7577 | { |
| 7578 | p.SetState(472) |
| 7579 | p.Match(GScriptParserLPAREN) |
| 7580 | } |
| 7581 | p.SetState(474) |
| 7582 | p.GetErrorHandler().Sync(p) |
| 7583 | _la = p.GetTokenStream().LA(1) |
| 7584 | |
| 7585 | if (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<GScriptParserINT)|(1<<GScriptParserSTRING)|(1<<GScriptParserFLOAT)|(1<<GScriptParserBOOLEAN)|(1<<GScriptParserBYTE)|(1<<GScriptParserANY))) != 0) || _la == GScriptParserFUNCTION || _la == GScriptParserIDENTIFIER { |
| 7586 | { |
| 7587 | p.SetState(473) |
| 7588 | p.TypeList() |
| 7589 | } |
| 7590 | |
| 7591 | } |
| 7592 | { |
| 7593 | p.SetState(476) |
| 7594 | p.Match(GScriptParserRPAREN) |
| 7595 | } |
| 7596 | |
| 7597 | return localctx |
no test coverage detected