mirror of
				https://github.com/flynx/Slang.git
				synced 2025-10-31 11:30:13 +00:00 
			
		
		
		
	fixed some minor bugs + some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									01a0b7872a
								
							
						
					
					
						commit
						2596b93e84
					
				| @ -365,7 +365,7 @@ var NAMESPACE = { | |||||||
| 		return context.stack.pop() * context.stack.pop() | 		return context.stack.pop() * context.stack.pop() | ||||||
| 	}, | 	}, | ||||||
| 	'div': function(context){ | 	'div': function(context){ | ||||||
| 		return context.stack.pop() / context.stack.pop() | 		return 1/context.stack.pop() * context.stack.pop() | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// block/list operations...
 | 	// block/list operations...
 | ||||||
| @ -709,9 +709,8 @@ var BOOTSTRAP = [ | |||||||
| '	-- empty list, sum is 0...', | '	-- empty list, sum is 0...', | ||||||
| '	[ len 0 eq ] ?', | '	[ len 0 eq ] ?', | ||||||
| '		[ . 0 ]', | '		[ . 0 ]', | ||||||
| '	else', |  | ||||||
| '	-- sum of list of len 1 is it\'s content, so just pop it...', | '	-- sum of list of len 1 is it\'s content, so just pop it...', | ||||||
| '		[ [ len 1 eq ] ?', | '	else [ [ len 1 eq ] ?', | ||||||
| '		[ pop swap . ]', | '		[ pop swap . ]', | ||||||
| '	-- and now recursively sum up elements till the list is 1 in length...', | '	-- and now recursively sum up elements till the list is 1 in length...', | ||||||
| '	else', | '	else', | ||||||
| @ -728,7 +727,7 @@ var BOOTSTRAP = [ | |||||||
| '	[', | '	[', | ||||||
| '		-- format the word definition...', | '		-- format the word definition...', | ||||||
| '		--		NAME WORD	->	:: NAME WORD', | '		--		NAME WORD	->	:: NAME WORD', | ||||||
| '		s2b \\ :: -3 before b2s', | '		s2b \\ :: -2 before b2s', | ||||||
| '', | '', | ||||||
| '		-- our template...', | '		-- our template...', | ||||||
| '		-- exec the left side...', | '		-- exec the left side...', | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user