diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-02-05 15:09:44 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-02-05 15:10:02 -0800 |
| commit | f58dc0fcb7979ae9f67ab3b5daebc8c4a4d652ca (patch) | |
| tree | ca1360b86c5e7ce7186e56fe190e5557418cf781 /nomsu.lua | |
| parent | e8f9ef36d6dcd730e28ef5f62ac8e1fd7449170d (diff) | |
Reverted "use %" to expr-like behavior with return values preserved.
Diffstat (limited to 'nomsu.lua')
| -rw-r--r-- | nomsu.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1352,13 +1352,15 @@ do } end) self:define_action("run file %filename", get_line_no(), function(_filename) - return nomsu:run_file(_filename) + return { + expr = "nomsu:run_file(" .. tostring(nomsu:tree_to_lua(filename).expr) .. ")" + } end) return self:define_compile_action("use %filename", get_line_no(), function(_filename) local filename = nomsu:tree_to_value(_filename) nomsu:require_file(filename) return { - statements = "nomsu:require_file(" .. tostring(repr(filename)) .. ");" + expr = "nomsu:require_file(" .. tostring(repr(filename)) .. ");" } end) end |
