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

Method ExitFunctionType

resolver/type_resolver.go:215–227  ·  view source on GitHub ↗

ExitFunctionType 函数类型

(ctx *parser.FunctionTypeContext)

Source from the content-addressed store, hash-verified

213
214// ExitFunctionType 函数类型
215func (t *TypeResolver) ExitFunctionType(ctx *parser.FunctionTypeContext) {
216 returnType := t.at.GetTypeOfNode()[ctx.TypeTypeOrVoid()]
217 declareFunctionType := symbol.NewDeclareFunctionType(returnType)
218 t.at.AppendType(declareFunctionType)
219 t.at.PutTypeOfNode(ctx, declareFunctionType)
220
221 if ctx.TypeList() != nil {
222 for _, context := range ctx.TypeList().(*parser.TypeListContext).AllTypeType() {
223 t := t.at.GetTypeOfNode()[context]
224 declareFunctionType.AppendParameterType(t)
225 }
226 }
227}

Callers

nothing calls this directly

Calls 8

AppendParameterTypeMethod · 0.95
NewDeclareFunctionTypeFunction · 0.92
GetTypeOfNodeMethod · 0.80
AppendTypeMethod · 0.80
PutTypeOfNodeMethod · 0.80
AllTypeTypeMethod · 0.80
TypeTypeOrVoidMethod · 0.45
TypeListMethod · 0.45

Tested by

no test coverage detected