(i *interpreter, ext vmExtMap, kind string)
| 1252 | } |
| 1253 | |
| 1254 | func prepareExtVars(i *interpreter, ext vmExtMap, kind string) map[string]*cachedThunk { |
| 1255 | result := make(map[string]*cachedThunk) |
| 1256 | for name, content := range ext { |
| 1257 | diagnosticFile := "<" + kind + ":" + name + ">" |
| 1258 | switch content.kind { |
| 1259 | case extKindCode: |
| 1260 | result[name] = codeToPV(i, diagnosticFile, content.value) |
| 1261 | case extKindNode: |
| 1262 | result[name] = nodeToPV(i, diagnosticFile, content.node) |
| 1263 | default: |
| 1264 | result[name] = readyThunk(makeValueString(content.value)) |
| 1265 | } |
| 1266 | } |
| 1267 | return result |
| 1268 | } |
| 1269 | |
| 1270 | func buildObject(hide ast.ObjectFieldHide, fields map[string]value) *valueObject { |
| 1271 | fieldMap := simpleObjectFieldMap{} |
no test coverage detected
searching dependent graphs…