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

Method TypeTypeOrVoid

parser/gscript_parser.go:1595–1638  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1593}
1594
1595func (p *GScriptParser) TypeTypeOrVoid() (localctx ITypeTypeOrVoidContext) {
1596 localctx = NewTypeTypeOrVoidContext(p, p.GetParserRuleContext(), p.GetState())
1597 p.EnterRule(localctx, 14, GScriptParserRULE_typeTypeOrVoid)
1598
1599 defer func() {
1600 p.ExitRule()
1601 }()
1602
1603 defer func() {
1604 if err := recover(); err != nil {
1605 if v, ok := err.(antlr.RecognitionException); ok {
1606 localctx.SetException(v)
1607 p.GetErrorHandler().ReportError(p, v)
1608 p.GetErrorHandler().Recover(p, v)
1609 } else {
1610 panic(err)
1611 }
1612 }
1613 }()
1614
1615 p.SetState(144)
1616 p.GetErrorHandler().Sync(p)
1617
1618 switch p.GetTokenStream().LA(1) {
1619 case GScriptParserINT, GScriptParserSTRING, GScriptParserFLOAT, GScriptParserBOOLEAN, GScriptParserBYTE, GScriptParserANY, GScriptParserFUNCTION, GScriptParserIDENTIFIER:
1620 p.EnterOuterAlt(localctx, 1)
1621 {
1622 p.SetState(142)
1623 p.TypeType()
1624 }
1625
1626 case GScriptParserVOID:
1627 p.EnterOuterAlt(localctx, 2)
1628 {
1629 p.SetState(143)
1630 p.Match(GScriptParserVOID)
1631 }
1632
1633 default:
1634 panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
1635 }
1636
1637 return localctx
1638}
1639
1640// IQualifiedNameListContext is an interface to support dynamic dispatch.
1641type IQualifiedNameListContext interface {

Callers 5

FunctionDeclarationMethod · 0.95
FunctionTypeMethod · 0.95
ExitFunctionTypeMethod · 0.45

Calls 4

TypeTypeMethod · 0.95
NewTypeTypeOrVoidContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected