* Get the current value of a name, or `undefined` if there is no value. * * Note: Do not use `if (namespace.get(...))` to detect whether a macro * is defined, as the definition may be the empty string which evaluates * to `false` in JavaScript. Use `if (namespace.get(...) != nul
(name: string)
| 83 | * `if (namespace.has(...))`. |
| 84 | */ |
| 85 | get(name: string): Value | undefined { |
| 86 | if (this.current.hasOwnProperty(name)) { |
| 87 | return this.current[name]; |
| 88 | } else { |
| 89 | return this.builtins[name]; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Set the current value of a name, and optionally set it globally too. |
no outgoing calls
no test coverage detected