mirror of
				https://github.com/Reuh/candran.git
				synced 2025-10-27 17:59:30 +00:00 
			
		
		
		
	v0.4.0
Updated README and tests
This commit is contained in:
		
							parent
							
								
									9b809fc8a4
								
							
						
					
					
						commit
						01ff6e6240
					
				
					 2 changed files with 48 additions and 1 deletions
				
			
		|  | @ -275,6 +275,28 @@ end | |||
| return a(2, 3) | ||||
| ]], 5) | ||||
| 
 | ||||
| -- let variable declaration | ||||
| test("let variable declaration", [[ | ||||
| let a = { | ||||
| 	foo = function() | ||||
| 		return type(a) | ||||
| 	end | ||||
| } | ||||
| return a.foo() | ||||
| ]], "table") | ||||
| 
 | ||||
| -- continue keyword | ||||
| test("continue keyword", [[ | ||||
| local a = "" | ||||
| for i=1, 10 do | ||||
| 	if i % 2 == 0 then | ||||
| 		continue | ||||
| 	end | ||||
| 	a = a .. i | ||||
| end | ||||
| return a | ||||
| ]], "13579") | ||||
| 
 | ||||
| -- results | ||||
| local resultCounter = {} | ||||
| local testCounter = 0 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue