| 44 | ); |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Pop the scope that `pushScope()` pushed. The scope keeps its definitions: |
| 49 | * an expression boxed in it reads them after the pop, as before it. Each |
| 50 | * definition only stops listening to configuration changes (a popped |
| 51 | * definition is not rounded again at a change of precision). The frame of a |
| 52 | * call (`name` is `call`) is discarded as any evaluation frame is: a value |
| 53 | * that reads it after the call reads the values that its activation holds. |
| 54 | */ |
| 55 | export function popScope(ce: IComputeEngine): void { |
| 56 | const context = ce._evalContextStack.pop(); |
| 57 | discardEvalContext(ce, context, context?.name !== 'call'); |
| 58 | } |
| 59 | |
| 60 | export function pushEvalContext( |
| 61 | ce: IComputeEngine, |
| 62 | scope: Scope, |