diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-23 15:43:06 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-23 15:43:06 -0800 |
| commit | e181c66ae4586e5f8e17504bdb4516895c3b3d34 (patch) | |
| tree | 3e05aadc851e6217c677a9492d2230c86d430325 /lib/core | |
| parent | fb20a1f48aae0fd1235529fa9caad45a502f5944 (diff) | |
Switching to use _1_as_lua()
Diffstat (limited to 'lib/core')
| -rw-r--r-- | lib/core/errors.nom | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/core/errors.nom b/lib/core/errors.nom index e24c012..e1dd9d4 100644 --- a/lib/core/errors.nom +++ b/lib/core/errors.nom @@ -23,8 +23,8 @@ use "core/control_flow" do local _a, _b = \($condition.1 as lua expr), \($condition.3 as lua expr) if _a ~= _b then - _a = type_of(_a) == 'Text' and _a:as_lua() or tostring(_a) - _b = type_of(_b) == 'Text' and _b:as_lua() or tostring(_b) + _a = type_of(_a) == 'Text' and _a:as_lua() or _1_as_text(_a) + _b = type_of(_b) == 'Text' and _b:as_lua() or _1_as_text(_b) at_1_fail(\(quote "\($condition.1.source)"), "Assumption failed: This value was ".._a.." but it was expected to be ".._b..".") end @@ -36,7 +36,7 @@ use "core/control_flow" do local _a, _b = \($condition.1 as lua expr), \($condition.3 as lua expr) if _a == _b then - _a = type_of(_a) == 'Text' and _a:as_lua() or tostring(_a) + _a = type_of(_a) == 'Text' and _a:as_lua() or _1_as_text(_a) at_1_fail(\(quote "\($condition.1.source)"), "Assumption failed: This value was ".._a.." but it wasn't expected to be.") end @@ -48,8 +48,8 @@ use "core/control_flow" do local _a, _b = \($condition.1 as lua expr), \($condition.3 as lua expr) if _a ~= _b then - _a = type_of(_a) == 'Text' and _a:as_lua() or tostring(_a) - _b = type_of(_b) == 'Text' and _b:as_lua() or tostring(_b) + _a = type_of(_a) == 'Text' and _a:as_lua() or _1_as_text(_a) + _b = type_of(_b) == 'Text' and _b:as_lua() or _1_as_text(_b) at_1_fail(\(quote "\($condition.1.source)"), "Assumption failed: This value was ".._a..", but it was expected to be \($condition.3)".._b..".") end |
