From 5059c081ac624ede925d5256885509ddd17181c6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 30 Dec 2018 23:58:47 -0800 Subject: Auto-upgraded code. --- core/errors.nom | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'core/errors.nom') diff --git a/core/errors.nom b/core/errors.nom index 9cf7a23..edcfffa 100644 --- a/core/errors.nom +++ b/core/errors.nom @@ -7,10 +7,12 @@ use "core/metaprogramming.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (barf $msg) compiles to -.."error(\(=lua "\$msg and \($msg as lua expr) or 'nil'"), 0);" + "error(\(=lua "\$msg and \($msg as lua expr) or 'nil'"), 0);" (assume $condition) compiles to: - lua> "local \$assumption = 'Assumption failed: '..tostring((\$condition):get_source_code())" + lua> (" + local \$assumption = 'Assumption failed: '..tostring((\$condition):get_source_code()) + ") return Lua (" @@ -29,7 +31,8 @@ use "core/metaprogramming.nom" do local \(mangle "a"), \(mangle "b") = \($a as lua expr), \($b as lua expr) if \(mangle "a") ~= \(mangle "b") then - error(\(quote "\$assumption").."\\n"..tostring(\(mangle "a")).." != "..tostring(\(mangle "b")), 0) + error(\(quote "\$assumption").."\\n"..tostring(\(mangle "a")).." != "..tostring(\ + ..\(mangle "b")), 0) end end ") -- cgit v1.2.3