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:
		
							parent
							
								
									b233d7fa1e
								
							
						
					
					
						commit
						a6c4eee4b3
					
				
					 14 changed files with 84 additions and 71 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
|  | @ -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" } | ||||
| ]]-- | ||||
|  | @ -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" } | ||||
| ]]-- | ||||
|  | @ -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' } | ||||
| ]]-- | ||||
|  | @ -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" } | ||||
| ]]-- | ||||
|  | @ -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' } | ||||
| ]]-- | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue