The Python AST (hive-gimp.py.ast) as Python source text.
Pure and byte-exact: the rules are the ones docs/py-strata.md states and
test/hive_gimp/py_test.clj asserts. Nothing here reads Clojure forms; it
speaks only nodes.
OPEN BY REGISTRATION
expr and stmt are multimethods on :py/node, and a literal is spelt
through the PyLiteral protocol extended per value type. A new node is a
defmethod, a new literal type an extend-protocol; no dispatch is edited.
A node with no method, or a value with no literal, is refused with
{:hive-gimp/reason :py/unsupported-form}.
The Python AST (`hive-gimp.py.ast`) as Python source text.
Pure and byte-exact: the rules are the ones `docs/py-strata.md` states and
`test/hive_gimp/py_test.clj` asserts. Nothing here reads Clojure forms; it
speaks only nodes.
OPEN BY REGISTRATION
`expr` and `stmt` are multimethods on `:py/node`, and a literal is spelt
through the `PyLiteral` protocol extended per value type. A new node is a
`defmethod`, a new literal type an `extend-protocol`; no dispatch is edited.
A node with no method, or a value with no literal, is refused with
`{:hive-gimp/reason :py/unsupported-form}`.One expression node as Python source.
One expression node as Python source.
(module nodes)A vector of statement nodes as one Python source block.
A vector of statement nodes as one Python source block.
(params {:keys [fixed rest]}){:fixed ["a" "b"] :rest "r"} as a, b, *r.
`{:fixed ["a" "b"] :rest "r"}` as `a, b, *r`.
(literal v)A Clojure value as Python literal source.
A Clojure value as Python literal source.
One statement node as a vector of Python source lines.
One statement node as a vector of Python source lines.
(stmts nodes)Statement nodes as Python source lines.
Statement nodes as Python source lines.
(string-literal s)JSON string syntax is valid Python string syntax once / is left bare
(Python keeps the backslash of an unknown escape like \/).
JSON string syntax is valid Python string syntax once `/` is left bare (Python keeps the backslash of an unknown escape like `\/`).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |