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

Method FormalParameters

parser/gscript_parser.go:1865–1908  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1863}
1864
1865func (p *GScriptParser) FormalParameters() (localctx IFormalParametersContext) {
1866 localctx = NewFormalParametersContext(p, p.GetParserRuleContext(), p.GetState())
1867 p.EnterRule(localctx, 18, GScriptParserRULE_formalParameters)
1868 var _la int
1869
1870 defer func() {
1871 p.ExitRule()
1872 }()
1873
1874 defer func() {
1875 if err := recover(); err != nil {
1876 if v, ok := err.(antlr.RecognitionException); ok {
1877 localctx.SetException(v)
1878 p.GetErrorHandler().ReportError(p, v)
1879 p.GetErrorHandler().Recover(p, v)
1880 } else {
1881 panic(err)
1882 }
1883 }
1884 }()
1885
1886 p.EnterOuterAlt(localctx, 1)
1887 {
1888 p.SetState(154)
1889 p.Match(GScriptParserLPAREN)
1890 }
1891 p.SetState(156)
1892 p.GetErrorHandler().Sync(p)
1893 _la = p.GetTokenStream().LA(1)
1894
1895 if (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<GScriptParserFINAL)|(1<<GScriptParserINT)|(1<<GScriptParserSTRING)|(1<<GScriptParserFLOAT)|(1<<GScriptParserBOOLEAN)|(1<<GScriptParserBYTE)|(1<<GScriptParserANY))) != 0) || _la == GScriptParserFUNCTION || _la == GScriptParserIDENTIFIER {
1896 {
1897 p.SetState(155)
1898 p.FormalParameterList()
1899 }
1900
1901 }
1902 {
1903 p.SetState(158)
1904 p.Match(GScriptParserRPAREN)
1905 }
1906
1907 return localctx
1908}
1909
1910// IFormalParameterListContext is an interface to support dynamic dispatch.
1911type IFormalParameterListContext interface {

Callers 2

FunctionDeclarationMethod · 0.95
executeFunctionCallMethod · 0.45

Calls 4

FormalParameterListMethod · 0.95
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected