etnbrd/flx-compiler

View on GitHub
prototypes/recast/ast.json

Summary

Maintainability
Test Coverage
{
  "program": {
    "type": "Program",
    "body": [
      {
        "type": "FunctionDeclaration",
        "id": {
          "type": "Identifier",
          "name": "add"
        },
        "params": [
          {
            "type": "Identifier",
            "name": "a"
          },
          {
            "type": "Identifier",
            "name": "b"
          }
        ],
        "defaults": [],
        "body": {
          "type": "BlockStatement",
          "body": [
            {
              "type": "ReturnStatement",
              "argument": {
                "type": "BinaryExpression",
                "operator": "+",
                "left": {
                  "type": "Identifier",
                  "name": "a"
                },
                "right": {
                  "type": "Identifier",
                  "name": "b"
                }
              }
            }
          ]
        },
        "rest": null,
        "generator": false,
        "expression": false
      },
      {
        "type": "VariableDeclaration",
        "declarations": [
          {
            "type": "VariableDeclarator",
            "id": {
              "type": "Identifier",
              "name": "c"
            },
            "init": {
              "type": "CallExpression",
              "callee": {
                "type": "Identifier",
                "name": "add"
              },
              "arguments": [
                {
                  "type": "Literal",
                  "value": 4,
                  "raw": "4"
                },
                {
                  "type": "Literal",
                  "value": 5,
                  "raw": "5"
                }
              ]
            }
          }
        ],
        "kind": "var"
      }
    ],
    "errors": []
  },
  "type": "File"
}



{ 
  lines: {},
  start: {
    line: 1,
    column: 0
  },
  end: {
    line: 4,
    column: 18
  }
}