diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-19 15:11:51 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-19 15:12:00 -0800 |
| commit | d888b1134a95493db80a271052e38bdd3916f4ef (patch) | |
| tree | b1f9c8e6f37f93cab86e9de2b089ac4950977024 | |
| parent | 7759b778f6d78c92b039c4bf3453c91e9385bd3c (diff) | |
Added more info to error message.
| -rw-r--r-- | nomsu.lua | 2 | ||||
| -rwxr-xr-x | nomsu.moon | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1007,7 +1007,7 @@ do break end local lua = self:tree_to_lua(tok) - assert(lua.expr, "Cannot use " .. tostring(tok.src) .. " as an argument, since it's not an expression.") + assert(lua.expr, "Cannot use " .. tostring(tok.src) .. " as an argument, since it's not an expression, it produces: " .. tostring(repr(lua))) insert(args, lua.expr) _continue_0 = true until true @@ -677,7 +677,7 @@ class NomsuCompiler for tok in *tree.value if tok.type == "Word" then continue lua = @tree_to_lua(tok) - assert(lua.expr, "Cannot use #{tok.src} as an argument, since it's not an expression.") + assert(lua.expr, "Cannot use #{tok.src} as an argument, since it's not an expression, it produces: #{repr lua}") insert args, lua.expr if metadata and metadata.arg_orders |
