UNPKG

esther-medina-quintero-parser-nearley

Version:
306 lines 7.05 kB
{ "type": "apply", "operator": { "type": "word", "offset": 0, "lineBreaks": 0, "line": 1, "col": 1, "name": "do" }, "args": [ { "type": "apply", "operator": { "type": "word", "offset": 6, "lineBreaks": 0, "line": 2, "col": 3, "name": "def" }, "args": [ { "type": "word", "offset": 10, "lineBreaks": 0, "line": 2, "col": 7, "name": "f" }, { "type": "apply", "operator": { "type": "word", "offset": 13, "lineBreaks": 0, "line": 2, "col": 10, "name": "fun" }, "args": [ { "type": "word", "offset": 17, "lineBreaks": 0, "line": 2, "col": 14, "name": "x" }, { "type": "apply", "operator": { "type": "word", "offset": 20, "lineBreaks": 0, "line": 2, "col": 17, "name": "+" }, "args": [ { "type": "word", "offset": 22, "lineBreaks": 0, "line": 2, "col": 19, "name": "x" }, { "type": "value", "value": 1, "raw": "1" } ] } ] } ] }, { "type": "apply", "operator": { "type": "word", "offset": 32, "lineBreaks": 0, "line": 3, "col": 3, "name": "def" }, "args": [ { "type": "word", "offset": 36, "lineBreaks": 0, "line": 3, "col": 7, "name": "g" }, { "type": "apply", "operator": { "type": "word", "offset": 39, "lineBreaks": 0, "line": 3, "col": 10, "name": "fun" }, "args": [ { "type": "word", "offset": 43, "lineBreaks": 0, "line": 3, "col": 14, "name": "x" }, { "type": "apply", "operator": { "type": "word", "offset": 46, "lineBreaks": 0, "line": 3, "col": 17, "name": "*" }, "args": [ { "type": "word", "offset": 48, "lineBreaks": 0, "line": 3, "col": 19, "name": "x" }, { "type": "value", "value": 2, "raw": "2" } ] } ] } ] }, { "type": "apply", "operator": { "type": "word", "offset": 58, "lineBreaks": 0, "line": 4, "col": 3, "name": "def" }, "args": [ { "type": "word", "offset": 62, "lineBreaks": 0, "line": 4, "col": 7, "name": "**" }, { "type": "apply", "operator": { "type": "word", "offset": 66, "lineBreaks": 0, "line": 4, "col": 11, "name": "fun" }, "args": [ { "type": "word", "offset": 70, "lineBreaks": 0, "line": 4, "col": 15, "name": "lambda1" }, { "type": "word", "offset": 79, "lineBreaks": 0, "line": 4, "col": 24, "name": "lambda2" }, { "type": "apply", "operator": { "type": "word", "offset": 88, "lineBreaks": 0, "line": 4, "col": 33, "name": "fun" }, "args": [ { "type": "word", "offset": 92, "lineBreaks": 0, "line": 4, "col": 37, "name": "z" }, { "type": "apply", "operator": { "type": "word", "offset": 95, "lineBreaks": 0, "line": 4, "col": 40, "name": "lambda1" }, "args": [ { "type": "apply", "operator": { "type": "word", "offset": 103, "lineBreaks": 0, "line": 4, "col": 48, "name": "lambda2" }, "args": [ { "type": "word", "offset": 111, "lineBreaks": 0, "line": 4, "col": 56, "name": "z" } ] } ] } ] } ] } ] }, { "type": "apply", "operator": { "type": "word", "offset": 174, "lineBreaks": 0, "line": 8, "col": 3, "name": "print" }, "args": [ { "type": "apply", "operator": { "type": "apply", "operator": { "type": "word", "offset": 180, "lineBreaks": 0, "line": 8, "col": 9, "name": "**" }, "args": [ { "type": "word", "offset": 183, "lineBreaks": 0, "line": 8, "col": 12, "name": "g" }, { "type": "word", "offset": 185, "lineBreaks": 0, "line": 8, "col": 14, "name": "f" } ] }, "args": [ { "type": "value", "value": 8, "raw": "8" } ] } ] } ] }