{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x" }, "init": { "type": "Literal", "value": 1, "raw": "1" } } ], "kind": "var" }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y" }, "init": { "type": "Literal", "value": 2, "raw": "2" } } ], "kind": "var" }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "bar" }, "params": [], "defaults": [], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x" }, "right": { "type": "Identifier", "name": "y" } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo" }, "arguments": [] } } ] }, "alternate": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x" }, "right": { "type": "Identifier", "name": "y" } } }, { "type": "ReturnStatement", "argument": null } ] } }, { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "i" }, "init": { "type": "Literal", "value": 0, "raw": "0" } } ], "kind": "var" }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "i" }, "right": { "type": "Literal", "value": 2, "raw": "2" } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "i" }, "prefix": false }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "+=", "left": { "type": "Identifier", "name": "x" }, "right": { "type": "Identifier", "name": "i" } } } ] } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "bar" }, "arguments": [] } } ] }, "rest": null, "generator": false, "expression": false } ] }