MCPcopy Index your code
hub / github.com/crossoverJie/gscript / ForInit

Method ForInit

parser/gscript_parser.go:5664–5704  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5662}
5663
5664func (p *GScriptParser) ForInit() (localctx IForInitContext) {
5665 localctx = NewForInitContext(p, p.GetParserRuleContext(), p.GetState())
5666 p.EnterRule(localctx, 60, GScriptParserRULE_forInit)
5667
5668 defer func() {
5669 p.ExitRule()
5670 }()
5671
5672 defer func() {
5673 if err := recover(); err != nil {
5674 if v, ok := err.(antlr.RecognitionException); ok {
5675 localctx.SetException(v)
5676 p.GetErrorHandler().ReportError(p, v)
5677 p.GetErrorHandler().Recover(p, v)
5678 } else {
5679 panic(err)
5680 }
5681 }
5682 }()
5683
5684 p.SetState(348)
5685 p.GetErrorHandler().Sync(p)
5686 switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 40, p.GetParserRuleContext()) {
5687 case 1:
5688 p.EnterOuterAlt(localctx, 1)
5689 {
5690 p.SetState(346)
5691 p.VariableDeclarators()
5692 }
5693
5694 case 2:
5695 p.EnterOuterAlt(localctx, 2)
5696 {
5697 p.SetState(347)
5698 p.ExpressionList()
5699 }
5700
5701 }
5702
5703 return localctx
5704}
5705
5706// IParExpressionContext is an interface to support dynamic dispatch.
5707type IParExpressionContext interface {

Callers 2

ForControlMethod · 0.95
VisitForControlMethod · 0.45

Calls 5

VariableDeclaratorsMethod · 0.95
ExpressionListMethod · 0.95
NewForInitContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected