* @constructor AccessorNode * @extends {Node} * Access an object property or get a matrix subset * * @param {Node} object The object from which to retrieve * a property or subset. * @param {IndexNode} index
(object, index, optionalChaining = false)
| 53 | * Forces evaluate to undefined if the given object is undefined or null. |
| 54 | */ |
| 55 | constructor (object, index, optionalChaining = false) { |
| 56 | super() |
| 57 | if (!isNode(object)) { |
| 58 | throw new TypeError('Node expected for parameter "object"') |
| 59 | } |
| 60 | if (!isIndexNode(index)) { |
| 61 | throw new TypeError('IndexNode expected for parameter "index"') |
| 62 | } |
| 63 | |
| 64 | this.object = object |
| 65 | this.index = index |
| 66 | this.optionalChaining = optionalChaining |
| 67 | } |
| 68 | |
| 69 | // readonly property name |
| 70 | get name () { |
nothing calls this directly
no test coverage detected