diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-26 14:04:51 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-26 14:04:59 -0700 |
| commit | 6fecb5d3950949d3bcf232f74283229248c21247 (patch) | |
| tree | 7ca4e5846e288b8cebd4e958760a2d18dd51a58d | |
| parent | 7f99c70d564ec999e782e83f482e6d8e22c88ef2 (diff) | |
Cleaning up codegen and TODO
| -rw-r--r-- | core/metaprogramming.nom | 3 | ||||
| -rwxr-xr-x | nomsu.moon | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index f6f202f..e967172 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -97,8 +97,7 @@ immediately local template = nomsu:parse(Nomsu(]]..repr(tree.source)..[[, ]]..template..[[)); local replacement = nomsu:tree_with_replaced_vars(template, ]]..replacements..[[); return replacement:as_lua(nomsu); - end); - ]]); + end);]]); return lua; action [remove action %stub] @@ -30,16 +30,14 @@ debug_getinfo = debug.getinfo -- TODO: -- consider non-linear codegen, rather than doing thunks for things like comprehensions --- improve indentation of generated lua code --- better error reporting -- type checking? -- Add compiler options for optimization level (compile-fast vs. run-fast, etc.) -- Do a pass on all actions to enforce parameters-are-nouns heuristic -- Maybe do some sort of lazy definitions of actions that defer until they're used in code -- Add a ((%x foo %y) where {x:"asdf", y:"fdsa"}) compile-time action for substitution --- Allow plain text backslash like: "\n" in longstrings without requiring "\\n" +-- Allow plain text backslash like: "\n" in indented text without requiring "\\n" -- Maybe support some kind of regex action definitions like "foo %first (and %next)*"? --- Re-implement nomsu-to-lua comment translation +-- Re-implement nomsu-to-lua comment translation? export FILE_CACHE -- FILE_CACHE is a map from filename (string) -> string of file contents |
