* Process a function body, after labels have been collected. * * @param {Object} ast The `FunctionDeclaration` or `FunctionExpression` to process. * @param {Object} options The options for the processor. * @return {Object} The processed node.
(ast, options)
| 239 | * @return {Object} The processed node. |
| 240 | */ |
| 241 | function processFunctionBody(ast, options) { |
| 242 | OBLIGATIONS.precondition(ast && typeof ast === 'object'); |
| 243 | OBLIGATIONS.precondition(ast.type === 'FunctionDeclaration' || ast.type === 'FunctionExpression'); |
| 244 | var __result; |
| 245 | __result = estraverse.replace(ast, { |
| 246 | enter: function (node) { |
| 247 | if (node.type === 'BlockStatement') { |
| 248 | return processBlockStatement(node, ast, options); |
| 249 | } |
| 250 | } |
| 251 | }); |
| 252 | OBLIGATIONS.postcondition(__result && typeof __result === 'object'); |
| 253 | return __result; |
| 254 | } |
| 255 | /** |
| 256 | * Process a block statement in a function body, after labels have been collected. |
| 257 | * |
no test coverage detected