| 1404 | } |
| 1405 | |
| 1406 | class WasmScopeVariable implements IVariable { |
| 1407 | /** @inheritdoc */ |
| 1408 | public readonly id = getVariableId(); |
| 1409 | |
| 1410 | /** @inheritdoc */ |
| 1411 | public readonly sortOrder = wasmScopeNames[this.kind]?.sortOrder || 0; |
| 1412 | |
| 1413 | constructor( |
| 1414 | private readonly context: VariableContext, |
| 1415 | public readonly kind: WasmScope, |
| 1416 | private readonly variables: readonly IWasmVariable[], |
| 1417 | private readonly scopeRef: IScopeRef, |
| 1418 | ) {} |
| 1419 | |
| 1420 | toDap(): Promise<Dap.Variable> { |
| 1421 | return Promise.resolve({ |
| 1422 | name: wasmScopeNames[this.kind]?.name || this.kind, |
| 1423 | value: '', |
| 1424 | variablesReference: this.id, |
| 1425 | }); |
| 1426 | } |
| 1427 | |
| 1428 | getChildren(): Promise<IVariable[]> { |
| 1429 | return Promise.all( |
| 1430 | this.variables.map(async v => { |
| 1431 | const evaluated = await v.evaluate(); |
| 1432 | return this.context.createVariable( |
| 1433 | WasmVariable, |
| 1434 | { |
| 1435 | name: v.name, |
| 1436 | presentationHint: WasmVariable.presentationHint, |
| 1437 | }, |
| 1438 | evaluated, |
| 1439 | this.scopeRef, |
| 1440 | ); |
| 1441 | }), |
| 1442 | ); |
| 1443 | } |
| 1444 | } |
| 1445 | |
| 1446 | class Scope implements IVariableContainer { |
| 1447 | /** @inheritdoc */ |
nothing calls this directly
no outgoing calls
no test coverage detected