(declareContext map[string]placeholder.Type)
| 185 | } |
| 186 | |
| 187 | func (api *API) checkTypeContext(declareContext map[string]placeholder.Type) error { |
| 188 | var em = newErrorManager() |
| 189 | for _, v := range api.TypeStmt { |
| 190 | switch tp := v.(type) { |
| 191 | case *ast.TypeLiteralStmt: |
| 192 | em.add(api.checkTypeExprContext(declareContext, tp.Expr.DataType)) |
| 193 | case *ast.TypeGroupStmt: |
| 194 | for _, v := range tp.ExprList { |
| 195 | em.add(api.checkTypeExprContext(declareContext, v.DataType)) |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | return em.error() |
| 200 | } |
| 201 | |
| 202 | func (api *API) checkTypeExprContext(declareContext map[string]placeholder.Type, tp ast.DataType) error { |
| 203 | switch val := tp.(type) { |
no test coverage detected