UNPKG

evm2term

Version:

Translates from Egg Virtual Machine (JSON) to a summarized AST term

115 lines 2.35 kB
{ "type": "apply", "operator": { "type": "word", "line": 1, "col": 1, "length": 2, "name": "do" }, "args": [ { "type": "apply", "operator": { "type": "word", "line": 2, "col": 5, "length": 3, "name": "def" }, "args": [ { "type": "word", "line": 2, "col": 9, "length": 1, "name": "f" }, { "type": "apply", "operator": { "type": "word", "line": 2, "col": 12, "length": 3, "name": "fun" }, "args": [ { "type": "word", "line": 2, "col": 16, "length": 1, "name": "x" }, { "type": "word", "line": 2, "col": 19, "length": 1, "name": "y" }, { "type": "apply", "operator": { "type": "word", "line": 2, "col": 22, "length": 1, "name": "+" }, "args": [ { "type": "word", "line": 2, "col": 24, "length": 1, "name": "x" }, { "type": "word", "line": 2, "col": 26, "length": 1, "name": "y" } ] } ] } ] }, { "type": "apply", "operator": { "type": "word", "line": 3, "col": 5, "length": 5, "name": "print" }, "args": [ { "type": "property", "operator": { "type": "word", "line": 3, "col": 11, "length": 1, "name": "f" }, "args": [ { "type": "value", "value": "numParams", "line": 3, "col": 13, "length": 11, "raw": "\"numParams\"" } ] } ] } ] }