summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.hy2
1 files changed, 2 insertions, 0 deletions
diff --git a/build.hy b/build.hy
index 1737d98..8546518 100644
--- a/build.hy
+++ b/build.hy
@@ -31,6 +31,7 @@
(import [DUCK.Tools [buildhelper]])
(defn walk-ast [node]
+ "Normalize the syntax tree for compatibility with DUCK."
(when (and (isinstance node Return)
(= node.value.id "None"))
(setv node.value.id None))
@@ -39,6 +40,7 @@
(walk-ast child))))
(defn my-hy-compile [source]
+ "Return a normalized syntax tree for SOURCE."
(let [ast (hy-compile (hy-parse source) "<unknown>")]
(walk-ast ast)
ast))