* @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)
| 791 | * @returns {Array} the append retArr |
| 792 | */ |
| 793 | astBlockStatement(bNode, retArr) { |
| 794 | if (this.isState('loop-body')) { |
| 795 | this.pushState('block-body'); // this prevents recursive removal of braces |
| 796 | for (let i = 0; i < bNode.body.length; i++) { |
| 797 | this.astGeneric(bNode.body[i], retArr); |
| 798 | } |
| 799 | this.popState('block-body'); |
| 800 | } else { |
| 801 | retArr.push('{\n'); |
| 802 | for (let i = 0; i < bNode.body.length; i++) { |
| 803 | this.astGeneric(bNode.body[i], retArr); |
| 804 | } |
| 805 | retArr.push('}\n'); |
| 806 | } |
| 807 | return retArr; |
| 808 | } |
| 809 | |
| 810 | /** |
| 811 | * @desc Parses the abstract syntax tree for *Variable Declaration* |
nothing calls this directly
no test coverage detected