()
| 8046 | } |
| 8047 | |
| 8048 | func (p *GScriptParser) Parse() (localctx IParseContext) { |
| 8049 | localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState()) |
| 8050 | p.EnterRule(localctx, 84, GScriptParserRULE_parse) |
| 8051 | var _la int |
| 8052 | |
| 8053 | defer func() { |
| 8054 | p.ExitRule() |
| 8055 | }() |
| 8056 | |
| 8057 | defer func() { |
| 8058 | if err := recover(); err != nil { |
| 8059 | if v, ok := err.(antlr.RecognitionException); ok { |
| 8060 | localctx.SetException(v) |
| 8061 | p.GetErrorHandler().ReportError(p, v) |
| 8062 | p.GetErrorHandler().Recover(p, v) |
| 8063 | } else { |
| 8064 | panic(err) |
| 8065 | } |
| 8066 | } |
| 8067 | }() |
| 8068 | |
| 8069 | p.EnterOuterAlt(localctx, 1) |
| 8070 | p.SetState(485) |
| 8071 | p.GetErrorHandler().Sync(p) |
| 8072 | _la = p.GetTokenStream().LA(1) |
| 8073 | |
| 8074 | for ok := true; ok; ok = (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<GScriptParserSUPER)|(1<<GScriptParserTHIS)|(1<<GScriptParserNil)|(1<<GScriptParserLPAREN)|(1<<GScriptParserBANG)|(1<<GScriptParserTILDE))) != 0) || (((_la-37)&-(0x1f+1)) == 0 && ((1<<uint((_la-37)))&((1<<(GScriptParserPLUS-37))|(1<<(GScriptParserSUB-37))|(1<<(GScriptParserBOOL_LITERAL-37))|(1<<(GScriptParserSTRING_LITERAL-37))|(1<<(GScriptParserRAW_STRING_LIT-37))|(1<<(GScriptParserNULL_LITERAL-37))|(1<<(GScriptParserDECIMAL_LITERAL-37))|(1<<(GScriptParserFLOAT_LITERAL-37))|(1<<(GScriptParserIDENTIFIER-37)))) != 0) { |
| 8075 | { |
| 8076 | p.SetState(484) |
| 8077 | |
| 8078 | var _x = p.expr(0) |
| 8079 | |
| 8080 | localctx.(*ParseContext)._expr = _x |
| 8081 | } |
| 8082 | localctx.(*ParseContext).expr_list = append(localctx.(*ParseContext).expr_list, localctx.(*ParseContext)._expr) |
| 8083 | |
| 8084 | p.SetState(487) |
| 8085 | p.GetErrorHandler().Sync(p) |
| 8086 | _la = p.GetTokenStream().LA(1) |
| 8087 | } |
| 8088 | { |
| 8089 | p.SetState(489) |
| 8090 | p.Match(GScriptParserEOF) |
| 8091 | } |
| 8092 | |
| 8093 | return localctx |
| 8094 | } |
| 8095 | |
| 8096 | func (p *GScriptParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { |
| 8097 | switch ruleIndex { |
no test coverage detected