ExitFunctionType 函数类型
(ctx *parser.FunctionTypeContext)
| 213 | |
| 214 | // ExitFunctionType 函数类型 |
| 215 | func (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 | } |
nothing calls this directly
no test coverage detected