()
| 967 | } |
| 968 | |
| 969 | func (p *GScriptParser) MemberDeclaration() (localctx IMemberDeclarationContext) { |
| 970 | localctx = NewMemberDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) |
| 971 | p.EnterRule(localctx, 6, GScriptParserRULE_memberDeclaration) |
| 972 | |
| 973 | defer func() { |
| 974 | p.ExitRule() |
| 975 | }() |
| 976 | |
| 977 | defer func() { |
| 978 | if err := recover(); err != nil { |
| 979 | if v, ok := err.(antlr.RecognitionException); ok { |
| 980 | localctx.SetException(v) |
| 981 | p.GetErrorHandler().ReportError(p, v) |
| 982 | p.GetErrorHandler().Recover(p, v) |
| 983 | } else { |
| 984 | panic(err) |
| 985 | } |
| 986 | } |
| 987 | }() |
| 988 | |
| 989 | p.SetState(113) |
| 990 | p.GetErrorHandler().Sync(p) |
| 991 | switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) { |
| 992 | case 1: |
| 993 | p.EnterOuterAlt(localctx, 1) |
| 994 | { |
| 995 | p.SetState(111) |
| 996 | p.FunctionDeclaration() |
| 997 | } |
| 998 | |
| 999 | case 2: |
| 1000 | p.EnterOuterAlt(localctx, 2) |
| 1001 | { |
| 1002 | p.SetState(112) |
| 1003 | p.FieldDeclaration() |
| 1004 | } |
| 1005 | |
| 1006 | } |
| 1007 | |
| 1008 | return localctx |
| 1009 | } |
| 1010 | |
| 1011 | // IFunctionDeclarationContext is an interface to support dynamic dispatch. |
| 1012 | type IFunctionDeclarationContext interface { |
no test coverage detected