1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Show source file in error messages

This commit is contained in:
Étienne Fildadut 2020-09-18 23:59:22 +02:00
parent b233d7fa1e
commit a6c4eee4b3
14 changed files with 84 additions and 71 deletions

View file

@ -182,6 +182,7 @@ else
print(inspect(result))
print("is not equal to")
print(inspect(output))
print("")
end
else
success = success + 1
@ -192,6 +193,7 @@ else
print(e)
print("result was:")
print(inspect(result))
print("")
end
end
end

View file

@ -1,6 +1,6 @@
local _={}
_[1]={"error","trying to define variable define override function.a, but a function with the same name exists; at line 3"}
_[1]={"error","trying to define variable define override function.a, but a function with the same name exists; at test/tests/define override function.ans:3"}
return {_[1]}
--[[
{ "error", "trying to define variable define override function.a, but a function with the same name exists; at line 3" }
{ "error", "trying to define variable define override function.a, but a function with the same name exists; at test/tests/define override function.ans:3" }
]]--

View file

@ -1,6 +1,6 @@
local _={}
_[1]={"error","trying to define function define override variable.a, but a variable with the same name exists; at line 3"}
_[1]={"error","trying to define function define override variable.a, but a variable with the same name exists; at test/tests/define override variable.ans:3"}
return {_[1]}
--[[
{ "error", "trying to define function define override variable.a, but a variable with the same name exists; at line 3" }
{ "error", "trying to define function define override variable.a, but a variable with the same name exists; at test/tests/define override variable.ans:3" }
]]--

View file

@ -1,6 +1,6 @@
local _={}
_[1]={"error","function \"function args arity check fail.f\" expected 2 arguments but received 1; at line 4"}
_[1]={"error","function \"function args arity check fail.f\" expected 2 arguments but received 1; at test/tests/function args arity check fail.ans:4"}
return {_[1]}
--[[
{ "error", 'function "function args arity check fail.f" expected 2 arguments but received 1; at line 4' }
{ "error", 'function "function args arity check fail.f" expected 2 arguments but received 1; at test/tests/function args arity check fail.ans:4' }
]]--

View file

@ -1,6 +1,6 @@
local _={}
_[1]={"error","trying to define function function arity conflict.f with arity [2;2], but another function with the arity exist; at line 5"}
_[1]={"error","trying to define function function arity conflict.f with arity [2;2], but another function with the arity exist; at test/tests/function arity conflict.ans:5"}
return {_[1]}
--[[
{ "error", "trying to define function function arity conflict.f with arity [2;2], but another function with the arity exist; at line 5" }
{ "error", "trying to define function function arity conflict.f with arity [2;2], but another function with the arity exist; at test/tests/function arity conflict.ans:5" }
]]--

View file

@ -1,6 +1,6 @@
local _={}
_[1]={"error","unknown identifier \"b\"; at line 4"}
_[1]={"error","unknown identifier \"b\"; at test/tests/function scope wrong.ans:4"}
return {_[1]}
--[[
{ "error", 'unknown identifier "b"; at line 4' }
{ "error", 'unknown identifier "b"; at test/tests/function scope wrong.ans:4' }
]]--