* @desc Parses the abstract syntax tree for *Block* statement * @param {Object} bNode - the AST object to parse * @param {Array} retArr - return array string * @returns {Array} the append retArr
(bNode, retArr)
| 297 | * @returns {Array} the append retArr |
| 298 | */ |
| 299 | astBlockStatement(bNode, retArr) { |
| 300 | if (this.isState('loop-body')) { |
| 301 | this.pushState('block-body'); // this prevents recursive removal of braces |
| 302 | for (let i = 0; i < bNode.body.length; i++) { |
| 303 | this.astGeneric(bNode.body[i], retArr); |
| 304 | } |
| 305 | this.popState('block-body'); |
| 306 | } else { |
| 307 | retArr.push('{\n'); |
| 308 | for (let i = 0; i < bNode.body.length; i++) { |
| 309 | this.astGeneric(bNode.body[i], retArr); |
| 310 | } |
| 311 | retArr.push('}\n'); |
| 312 | } |
| 313 | return retArr; |
| 314 | } |
| 315 | |
| 316 | /** |
| 317 | * @desc Parses the abstract syntax tree for *Variable Declaration* |
nothing calls this directly
no test coverage detected