()
| 3004 | } |
| 3005 | |
| 3006 | func (p *GScriptParser) VariableDeclarator() (localctx IVariableDeclaratorContext) { |
| 3007 | localctx = NewVariableDeclaratorContext(p, p.GetParserRuleContext(), p.GetState()) |
| 3008 | p.EnterRule(localctx, 34, GScriptParserRULE_variableDeclarator) |
| 3009 | var _la int |
| 3010 | |
| 3011 | defer func() { |
| 3012 | p.ExitRule() |
| 3013 | }() |
| 3014 | |
| 3015 | defer func() { |
| 3016 | if err := recover(); err != nil { |
| 3017 | if v, ok := err.(antlr.RecognitionException); ok { |
| 3018 | localctx.SetException(v) |
| 3019 | p.GetErrorHandler().ReportError(p, v) |
| 3020 | p.GetErrorHandler().Recover(p, v) |
| 3021 | } else { |
| 3022 | panic(err) |
| 3023 | } |
| 3024 | } |
| 3025 | }() |
| 3026 | |
| 3027 | p.EnterOuterAlt(localctx, 1) |
| 3028 | { |
| 3029 | p.SetState(216) |
| 3030 | p.VariableDeclaratorId() |
| 3031 | } |
| 3032 | p.SetState(219) |
| 3033 | p.GetErrorHandler().Sync(p) |
| 3034 | _la = p.GetTokenStream().LA(1) |
| 3035 | |
| 3036 | if _la == GScriptParserASSIGN { |
| 3037 | { |
| 3038 | p.SetState(217) |
| 3039 | p.Match(GScriptParserASSIGN) |
| 3040 | } |
| 3041 | { |
| 3042 | p.SetState(218) |
| 3043 | p.VariableInitializer() |
| 3044 | } |
| 3045 | |
| 3046 | } |
| 3047 | |
| 3048 | return localctx |
| 3049 | } |
| 3050 | |
| 3051 | // IVariableDeclaratorIdContext is an interface to support dynamic dispatch. |
| 3052 | type IVariableDeclaratorIdContext interface { |
no test coverage detected