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

Method Block

parser/gscript_parser.go:4171–4206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4169}
4170
4171func (p *GScriptParser) Block() (localctx IBlockContext) {
4172 localctx = NewBlockContext(p, p.GetParserRuleContext(), p.GetState())
4173 p.EnterRule(localctx, 50, GScriptParserRULE_block)
4174
4175 defer func() {
4176 p.ExitRule()
4177 }()
4178
4179 defer func() {
4180 if err := recover(); err != nil {
4181 if v, ok := err.(antlr.RecognitionException); ok {
4182 localctx.SetException(v)
4183 p.GetErrorHandler().ReportError(p, v)
4184 p.GetErrorHandler().Recover(p, v)
4185 } else {
4186 panic(err)
4187 }
4188 }
4189 }()
4190
4191 p.EnterOuterAlt(localctx, 1)
4192 {
4193 p.SetState(279)
4194 p.Match(GScriptParserLBRACE)
4195 }
4196 {
4197 p.SetState(280)
4198 p.BlockStatements()
4199 }
4200 {
4201 p.SetState(281)
4202 p.Match(GScriptParserRBRACE)
4203 }
4204
4205 return localctx
4206}
4207
4208// IBlockStatementsContext is an interface to support dynamic dispatch.
4209type IBlockStatementsContext interface {

Callers 3

FunctionBodyMethod · 0.95
StatementMethod · 0.95
VisitFunctionBodyMethod · 0.45

Calls 4

BlockStatementsMethod · 0.95
NewBlockContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected