We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--print ast/js-ast
A minor thing I found previously: if you use pr-str instead of JSON.stringify to process the debug output, it looks much nicer:
pr-str
JSON.stringify
> echo "(print x)" | ./bin/wisp.js --compile --print ast [{"op" "invoke", "callee" {"start" {"line" 0, "column" 0}, "end" {"line" 0, "column" 9}, "op" "member-expression", "computed" false, "form" (aget console (quote log)), "target" {"start" {"line" 0, "column" 0}, "end" {"line" 0, "column" 8}, "op" "var", "type" "identifier", "form" console, "binding" {"op" "unresolved-binding", "type" "unresolved-binding", "identifier" {"type" "identifier", "form" console}, "start" {"line" 0, "column" 0}, "end" {"line" 0, "column" 8}}}, "property" {"start" {"line" 0, "column" 8}, "end" {"line" 0, "column" 9}, "op" "var", "type" "identifier", "form" log, "binding" nil}}, "params" [{"start" {"line" 0, "column" 7}, "end" {"line" 0, "column" 8}, "op" "var", "type" "identifier", "form" x, "binding" {"op" "unresolved-binding", "type" "unresolved-binding", "identifier" {"type" "identifier", "form" x}, "start" {"line" 0, "column" 7}, "end" {"line" 0, "column" 8}}}], "form" (console.log x)}]
vs.
> echo "(print x)" | ./bin/wisp.js --compile --print ast [ { "op": "invoke", "callee": { "start": { "line": 0, "column": 0 }, "end": { "line": 0, "column": 9 }, "op": "member-expression", "computed": false, "form": { "head": { "name": "aget" }, "tail": { "head": { "name": "console" }, "tail": { "head": { "head": { "name": "quote" }, "tail": { "head": { "name": "log" }, "tail": {}, "length": 1 }, "length": 2 }, "tail": {}, "length": 1 }, "length": 2 }, "length": 3 }, "target": { "start": { "line": 0, "column": 0 }, "end": { "line": 0, "column": 8 }, "op": "var", "type": "identifier", "form": { "name": "console" }, "binding": { "op": "unresolved-binding", "type": "unresolved-binding", "identifier": { "type": "identifier", "form": { "name": "console" } }, "start": { "line": 0, "column": 0 }, "end": { "line": 0, "column": 8 } } }, "property": { "start": { "line": 0, "column": 8 }, "end": { "line": 0, "column": 9 }, "op": "var", "type": "identifier", "form": { "name": "log" } } }, "params": [ { "start": { "line": 0, "column": 7 }, "end": { "line": 0, "column": 8 }, "op": "var", "type": "identifier", "form": { "name": "x" }, "binding": { "op": "unresolved-binding", "type": "unresolved-binding", "identifier": { "type": "identifier", "form": { "name": "x" } }, "start": { "line": 0, "column": 7 }, "end": { "line": 0, "column": 8 } } } ], "form": { "head": { "name": "console.log" }, "tail": { "head": { "name": "x" }, "tail": {}, "length": 1 }, "length": 2 } } ]
Coffeescript does something similar:
> coffee -cep -n "print x" Block Call Value "print" Value "x"
I did talk about this in my last pull request, but that thread was too convoluted as-is.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A minor thing I found previously: if you use
pr-str
instead ofJSON.stringify
to process the debug output, it looks much nicer:vs.
Coffeescript does something similar:
I did talk about this in my last pull request, but that thread was too convoluted as-is.
The text was updated successfully, but these errors were encountered: