MCPcopy Create free account
hub / github.com/crossoverJie/gscript / BlockStatements

Method BlockStatements

parser/gscript_parser.go:4321–4360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4319}
4320
4321func (p *GScriptParser) BlockStatements() (localctx IBlockStatementsContext) {
4322 localctx = NewBlockStatementsContext(p, p.GetParserRuleContext(), p.GetState())
4323 p.EnterRule(localctx, 52, GScriptParserRULE_blockStatements)
4324 var _la int
4325
4326 defer func() {
4327 p.ExitRule()
4328 }()
4329
4330 defer func() {
4331 if err := recover(); err != nil {
4332 if v, ok := err.(antlr.RecognitionException); ok {
4333 localctx.SetException(v)
4334 p.GetErrorHandler().ReportError(p, v)
4335 p.GetErrorHandler().Recover(p, v)
4336 } else {
4337 panic(err)
4338 }
4339 }
4340 }()
4341
4342 localctx = NewBlockStmsContext(p, localctx)
4343 p.EnterOuterAlt(localctx, 1)
4344 p.SetState(286)
4345 p.GetErrorHandler().Sync(p)
4346 _la = p.GetTokenStream().LA(1)
4347
4348 for (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<GScriptParserCLASS)|(1<<GScriptParserINT)|(1<<GScriptParserSTRING)|(1<<GScriptParserFLOAT)|(1<<GScriptParserBOOLEAN)|(1<<GScriptParserBYTE)|(1<<GScriptParserSUPER)|(1<<GScriptParserTHIS)|(1<<GScriptParserNil)|(1<<GScriptParserANY)|(1<<GScriptParserLPAREN)|(1<<GScriptParserLBRACE)|(1<<GScriptParserBANG)|(1<<GScriptParserTILDE))) != 0) || (((_la-37)&-(0x1f+1)) == 0 && ((1<<uint((_la-37)))&((1<<(GScriptParserPLUS-37))|(1<<(GScriptParserSUB-37))|(1<<(GScriptParserFUNCTION-37))|(1<<(GScriptParserVOID-37))|(1<<(GScriptParserFOR-37))|(1<<(GScriptParserIF-37))|(1<<(GScriptParserRETURN-37))|(1<<(GScriptParserBREAK-37))|(1<<(GScriptParserCONTINUE-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) {
4349 {
4350 p.SetState(283)
4351 p.BlockStatement()
4352 }
4353
4354 p.SetState(288)
4355 p.GetErrorHandler().Sync(p)
4356 _la = p.GetTokenStream().LA(1)
4357 }
4358
4359 return localctx
4360}
4361
4362// IBlockStatementContext is an interface to support dynamic dispatch.
4363type IBlockStatementContext interface {

Callers 2

ProgMethod · 0.95
BlockMethod · 0.95

Calls 5

BlockStatementMethod · 0.95
NewBlockStmsContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected