diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-12-30 14:31:07 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-12-30 14:31:07 -0800 |
| commit | 4789892824237dfb45d5f1cfb3442bfede34eeac (patch) | |
| tree | 32a32f66263f20d4b65ed8dbef8e0ee733366214 /lib/metaprogramming.nom | |
| parent | 21a6314e270344e6923bb4f0a06fd09b0d9ae581 (diff) | |
Got everything mostly working.
Diffstat (limited to 'lib/metaprogramming.nom')
| -rw-r--r-- | lib/metaprogramming.nom | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/metaprogramming.nom b/lib/metaprogramming.nom index 95deb0c..e86b904 100644 --- a/lib/metaprogramming.nom +++ b/lib/metaprogramming.nom @@ -27,6 +27,11 @@ rule [compile \%macro_def to \%body] =: local thunk = nomsu:tree_to_value(body); nomsu:defmacro(signature, thunk, ("compile %s\\n..to %s"):format(vars.macro_def.src, body.src)); +compile [fizz %n] to: + "print(\(%n as lua))" +compile [pumpo] to: + "print('pumpo')" + rule [compile \%macro_def to code \%body] =: lua> ".." local signature = {}; |
