summaryrefslogtreecommitdiff
path: root/build.hy
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-05-19 20:32:39 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-05-19 20:32:39 -0400
commit25a42c0838e4cbd613e6367b3befd48b404ce852 (patch)
tree783d34e97d41eaf995ecc3be31993c44f2fa5796 /build.hy
parentea613257da74430b18ce95e2cab99fbb3737c91c (diff)
Add docstringsHEADmaster
Diffstat (limited to 'build.hy')
-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))