diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-05-19 20:32:39 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-05-19 20:32:39 -0400 |
| commit | 25a42c0838e4cbd613e6367b3befd48b404ce852 (patch) | |
| tree | 783d34e97d41eaf995ecc3be31993c44f2fa5796 /build.hy | |
| parent | ea613257da74430b18ce95e2cab99fbb3737c91c (diff) | |
Diffstat (limited to 'build.hy')
| -rw-r--r-- | build.hy | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)) |