mirror of
				https://github.com/flynx/Course-JavaScript.git
				synced 2025-11-04 05:50:08 +00:00 
			
		
		
		
	minor changes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									e26277e6b7
								
							
						
					
					
						commit
						94c0c47c0f
					
				@ -564,16 +564,17 @@ var BOOTSTRAP = [
 | 
				
			|||||||
':: inc ( a -- b ) [ 1 add ]',
 | 
					':: inc ( a -- b ) [ 1 add ]',
 | 
				
			||||||
':: dec ( a -- b ) [ 1 sub ]',
 | 
					':: dec ( a -- b ) [ 1 sub ]',
 | 
				
			||||||
'',
 | 
					'',
 | 
				
			||||||
'-- experimental...',
 | 
					'',
 | 
				
			||||||
'-- NOTE: these are at this point stupid and do not support priorities or grouping...',
 | 
					'-- Meta-word examples (experimental)...',
 | 
				
			||||||
'-- NOTE: these have both stack and code effect, in genera the operations are of ',
 | 
					'',
 | 
				
			||||||
'--		the form: A op B',
 | 
					 | 
				
			||||||
'-- Here is an infix operator example...',
 | 
					'-- Here is an infix operator example...',
 | 
				
			||||||
'-- 	:: + ( a | b -- c |  ) [ \\ exec 2 0 _swapN \\ exec \\ add 2 1 _swapN ]',
 | 
					'-- 	:: + ( a | b -- c |  ) [ \\ exec 2 0 _swapN \\ exec \\ add 2 1 _swapN ]',
 | 
				
			||||||
'-- now let\'s make a meta function to make things shorter...',
 | 
					'-- now let\'s make a meta function to make things shorter...',
 | 
				
			||||||
 | 
					'-- first the helper...'
 | 
				
			||||||
':: _infix ( op word -- ) [',
 | 
					':: _infix ( op word -- ) [',
 | 
				
			||||||
'		-- format the word definition...',
 | 
					'		-- format the word definition...',
 | 
				
			||||||
'		s2b \\ :: -3 before b2s',
 | 
					'		s2b \\ :: -3 before b2s',
 | 
				
			||||||
 | 
					'',
 | 
				
			||||||
'		-- our template...',
 | 
					'		-- our template...',
 | 
				
			||||||
'		-- exec the left side...',
 | 
					'		-- exec the left side...',
 | 
				
			||||||
'		[ \\ exec 2 0 _swapN',
 | 
					'		[ \\ exec 2 0 _swapN',
 | 
				
			||||||
@ -581,12 +582,15 @@ var BOOTSTRAP = [
 | 
				
			|||||||
'				\\ exec \\ WORD 2 1 _swapN ] clone',
 | 
					'				\\ exec \\ WORD 2 1 _swapN ] clone',
 | 
				
			||||||
'			-- replace WORD with the actual target word...',
 | 
					'			-- replace WORD with the actual target word...',
 | 
				
			||||||
'			swap 8 to',
 | 
					'			swap 8 to',
 | 
				
			||||||
 | 
					'',
 | 
				
			||||||
'		-- push to code / run',
 | 
					'		-- push to code / run',
 | 
				
			||||||
'		3 0 _swapN ]',
 | 
					'		3 0 _swapN ]',
 | 
				
			||||||
 | 
					'',
 | 
				
			||||||
'-- formatter for the _infix word...',
 | 
					'-- formatter for the _infix word...',
 | 
				
			||||||
':: infix: ( | op word -- | ) [ \\ _infix 1 2 _swapN ]',
 | 
					':: infix: ( | op word -- | ) [ \\ _infix 1 2 _swapN ]',
 | 
				
			||||||
'',
 | 
					'',
 | 
				
			||||||
'-- Now making a word/2 an infix operator is trivial...',
 | 
					'-- Now making a word/2 an infix operator is trivial...',
 | 
				
			||||||
 | 
					'-- NOTE: these are at this point stupid and do not support priorities...',
 | 
				
			||||||
'infix: + add',
 | 
					'infix: + add',
 | 
				
			||||||
'infix: - sub',
 | 
					'infix: - sub',
 | 
				
			||||||
'infix: * mul',
 | 
					'infix: * mul',
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user