diff --git a/Slang/slang.js b/Slang/slang.js index d79b15d..99a0032 100755 --- a/Slang/slang.js +++ b/Slang/slang.js @@ -564,16 +564,17 @@ var BOOTSTRAP = [ ':: inc ( a -- b ) [ 1 add ]', ':: dec ( a -- b ) [ 1 sub ]', '', -'-- experimental...', -'-- NOTE: these are at this point stupid and do not support priorities or grouping...', -'-- NOTE: these have both stack and code effect, in genera the operations are of ', -'-- the form: A op B', +'', +'-- Meta-word examples (experimental)...', +'', '-- Here is an infix operator example...', '-- :: + ( a | b -- c | ) [ \\ exec 2 0 _swapN \\ exec \\ add 2 1 _swapN ]', '-- now let\'s make a meta function to make things shorter...', +'-- first the helper...' ':: _infix ( op word -- ) [', ' -- format the word definition...', ' s2b \\ :: -3 before b2s', +'', ' -- our template...', ' -- exec the left side...', ' [ \\ exec 2 0 _swapN', @@ -581,12 +582,15 @@ var BOOTSTRAP = [ ' \\ exec \\ WORD 2 1 _swapN ] clone', ' -- replace WORD with the actual target word...', ' swap 8 to', +'', ' -- push to code / run', ' 3 0 _swapN ]', +'', '-- formatter for the _infix word...', ':: infix: ( | op word -- | ) [ \\ _infix 1 2 _swapN ]', '', '-- 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: - sub', 'infix: * mul',