diff options
-rw-r--r-- | exuberant_ctags_rc | 1 | ||||
-rw-r--r-- | html/075channel.mu.html | 8 | ||||
-rw-r--r-- | html/edit/001-editor.mu.html | 2 | ||||
-rw-r--r-- | html/edit/002-typing.mu.html | 20 | ||||
-rw-r--r-- | html/edit/003-shortcuts.mu.html | 50 | ||||
-rw-r--r-- | html/edit/004-programming-environment.mu.html | 20 | ||||
-rw-r--r-- | html/edit/005-sandbox.mu.html | 30 | ||||
-rw-r--r-- | html/edit/006-sandbox-copy.mu.html | 2 | ||||
-rw-r--r-- | html/edit/007-sandbox-delete.mu.html | 2 | ||||
-rw-r--r-- | html/edit/008-sandbox-edit.mu.html | 2 | ||||
-rw-r--r-- | html/edit/009-sandbox-test.mu.html | 10 | ||||
-rw-r--r-- | html/edit/010-sandbox-trace.mu.html | 6 | ||||
-rw-r--r-- | html/edit/011-errors.mu.html | 14 | ||||
-rw-r--r-- | html/edit/012-editor-undo.mu.html | 40 | ||||
-rw-r--r-- | linkify/003linkify.cc | 17 |
15 files changed, 120 insertions, 104 deletions
diff --git a/exuberant_ctags_rc b/exuberant_ctags_rc index ce0ac4a8..25d3780c 100644 --- a/exuberant_ctags_rc +++ b/exuberant_ctags_rc @@ -6,3 +6,4 @@ --regex-mu=/^recipe![ \t]+([^ \t]*)/\1/d,definition/ --regex-mu=/^container[ \t]+([^ \t]*)/\1/s,struct/ --regex-mu=/^exclusive-container[ \t]+([^ \t]*)/\1/u,union/ +--regex-mu=/^[ \t]*(<[^ \t]*>)/\1/d,definition/ diff --git a/html/075channel.mu.html b/html/075channel.mu.html index 6c83aeea..cf0470d3 100644 --- a/html/075channel.mu.html +++ b/html/075channel.mu.html @@ -130,7 +130,7 @@ if ('onhashchange' in window) { <span id="L68" class="LineNr"> 68 </span> <span class="Constant">load-ingredients</span> <span id="L69" class="LineNr"> 69 </span> assert out, <span class="Constant">[write to null channel]</span> <span id="L70" class="LineNr"> 70 </span> chan:&:channel:_elem <span class="Special"><-</span> get *out, <span class="Constant">chan:offset</span> -<span id="L71" class="LineNr"> 71 </span><span class="Constant"> <channel-write-initial></span> +<span id="L71" class="LineNr"> 71 </span><span class="Constant"> <a href='075channel.mu.html#L71'><channel-write-initial></a></span> <span id="L72" class="LineNr"> 72 </span> <span class="Comment"># block until lock is acquired AND queue has room</span> <span id="L73" class="LineNr"> 73 </span> lock:location <span class="Special"><-</span> get-location *chan, <span class="Constant">lock:offset</span> <span id="L74" class="LineNr"> 74 </span><span class="CommentedCode">#? $print [write], 10/newline</span> @@ -190,7 +190,7 @@ if ('onhashchange' in window) { <span id="L128" class="LineNr">128 </span> <span class="Comment"># add to it</span> <span id="L129" class="LineNr">129 </span> reset lock <span id="L130" class="LineNr">130 </span> current-routine-is-blocked -<span id="L131" class="LineNr">131 </span><span class="Constant"> <channel-read-empty></span> +<span id="L131" class="LineNr">131 </span><span class="Constant"> <a href='075channel.mu.html#L131'><channel-read-empty></a></span> <span id="L132" class="LineNr">132 </span> switch <span class="Comment"># avoid spinlocking</span> <span id="L133" class="LineNr">133 </span> <span class="muControl">loop</span> <span id="L134" class="LineNr">134 </span> <span class="Delimiter">}</span> @@ -392,11 +392,11 @@ if ('onhashchange' in window) { <span id="L330" class="LineNr">330 </span><span class="Comment"># if a channel is closed for writing,</span> <span id="L331" class="LineNr">331 </span><span class="Comment"># future reads continue until the channel empties,</span> <span id="L332" class="LineNr">332 </span><span class="Comment"># then the channel is also closed for reading</span> -<span id="L333" class="LineNr">333 </span><span class="muRecipe">after</span> <span class="Constant"><channel-write-initial></span> [ +<span id="L333" class="LineNr">333 </span><span class="muRecipe">after</span> <span class="Constant"><a href='075channel.mu.html#L71'><channel-write-initial></a></span> [ <span id="L334" class="LineNr">334 </span> closed?:bool <span class="Special"><-</span> get *chan, <span class="Constant">closed?:offset</span> <span id="L335" class="LineNr">335 </span> <span class="muControl">return-if</span> closed? <span id="L336" class="LineNr">336 </span>] -<span id="L337" class="LineNr">337 </span><span class="muRecipe">after</span> <span class="Constant"><channel-read-empty></span> [ +<span id="L337" class="LineNr">337 </span><span class="muRecipe">after</span> <span class="Constant"><a href='075channel.mu.html#L131'><channel-read-empty></a></span> [ <span id="L338" class="LineNr">338 </span> closed?:bool <span class="Special"><-</span> get *chan, <span class="Constant">closed?:offset</span> <span id="L339" class="LineNr">339 </span> <span class="Delimiter">{</span> <span id="L340" class="LineNr">340 </span> <span class="muControl">break-unless</span> closed? diff --git a/html/edit/001-editor.mu.html b/html/edit/001-editor.mu.html index 63919b99..525ab56f 100644 --- a/html/edit/001-editor.mu.html +++ b/html/edit/001-editor.mu.html @@ -127,7 +127,7 @@ if ('onhashchange' in window) { <span id="L66" class="LineNr"> 66 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">top-of-screen:offset</span>, init <span id="L67" class="LineNr"> 67 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">before-cursor:offset</span>, init <span id="L68" class="LineNr"> 68 </span> result <span class="Special"><-</span> <a href='001-editor.mu.html#L72'>insert-text</a> result, s -<span id="L69" class="LineNr"> 69 </span><span class="Constant"> <editor-initialization></span> +<span id="L69" class="LineNr"> 69 </span><span class="Constant"> <a href='001-editor.mu.html#L69'><editor-initialization></a></span> <span id="L70" class="LineNr"> 70 </span>] <span id="L71" class="LineNr"> 71 </span> <span id="L72" class="LineNr"> 72 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L72'>insert-text</a> editor:&:editor, text:text<span class="muRecipe"> -> </span>editor:&:editor [ diff --git a/html/edit/002-typing.mu.html b/html/edit/002-typing.mu.html index 9d883a7e..d3f59451 100644 --- a/html/edit/002-typing.mu.html +++ b/html/edit/002-typing.mu.html @@ -241,7 +241,7 @@ if ('onhashchange' in window) { <span id="L180" class="LineNr"> 180 </span> <span class="muControl">break-unless</span> is-unicode? <span id="L181" class="LineNr"> 181 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[handle-keyboard-event: special character]</span> <span id="L182" class="LineNr"> 182 </span> <span class="Comment"># exceptions for special characters go here</span> -<span id="L183" class="LineNr"> 183 </span><span class="Constant"> <handle-special-character></span> +<span id="L183" class="LineNr"> 183 </span><span class="Constant"> <a href='002-typing.mu.html#L183'><handle-special-character></a></span> <span id="L184" class="LineNr"> 184 </span> <span class="Comment"># ignore any other special characters</span> <span id="L185" class="LineNr"> 185 </span> regular-character?:bool <span class="Special"><-</span> greater-or-equal c, <span class="Constant">32/space</span> <span id="L186" class="LineNr"> 186 </span> <span class="muControl">return-unless</span> regular-character?, <span class="Constant">0/don't-render</span> @@ -255,7 +255,7 @@ if ('onhashchange' in window) { <span id="L194" class="LineNr"> 194 </span> k:num, is-keycode?:bool <span class="Special"><-</span> maybe-convert e:<a href='../084console.mu.html#L4'>event</a>, <span class="Constant">keycode:variant</span> <span id="L195" class="LineNr"> 195 </span> assert is-keycode?, <span class="Constant">[event was of unknown type; neither keyboard nor mouse]</span> <span id="L196" class="LineNr"> 196 </span> <span class="Comment"># handlers for each special key will go here</span> -<span id="L197" class="LineNr"> 197 </span><span class="Constant"> <handle-special-key></span> +<span id="L197" class="LineNr"> 197 </span><span class="Constant"> <a href='002-typing.mu.html#L197'><handle-special-key></a></span> <span id="L198" class="LineNr"> 198 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L199" class="LineNr"> 199 </span>] <span id="L200" class="LineNr"> 200 </span> @@ -275,7 +275,7 @@ if ('onhashchange' in window) { <span id="L214" class="LineNr"> 214 </span> <a href='../081print.mu.html#L581'>screen-width</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L581'>screen-width</a> <a href='../081print.mu.html#L4'>screen</a> <span id="L215" class="LineNr"> 215 </span> <a href='../081print.mu.html#L594'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L594'>screen-height</a> <a href='../081print.mu.html#L4'>screen</a> <span id="L216" class="LineNr"> 216 </span> <span class="Comment"># occasionally we'll need to mess with the cursor</span> -<span id="L217" class="LineNr"> 217 </span><span class="Constant"> <insert-character-special-case></span> +<span id="L217" class="LineNr"> 217 </span><span class="Constant"> <a href='002-typing.mu.html#L217'><insert-character-special-case></a></span> <span id="L218" class="LineNr"> 218 </span> <span class="Comment"># but mostly we'll just move the cursor right</span> <span id="L219" class="LineNr"> 219 </span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> <span id="L220" class="LineNr"> 220 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column @@ -748,7 +748,7 @@ if ('onhashchange' in window) { <span id="L687" class="LineNr"> 687 </span> ] <span id="L688" class="LineNr"> 688 </span>] <span id="L689" class="LineNr"> 689 </span> -<span id="L690" class="LineNr"> 690 </span><span class="muRecipe">after</span> <span class="Constant"><insert-character-special-case></span> [ +<span id="L690" class="LineNr"> 690 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L217'><insert-character-special-case></a></span> [ <span id="L691" class="LineNr"> 691 </span> <span class="Comment"># if the line wraps at the cursor, move cursor to start of next row</span> <span id="L692" class="LineNr"> 692 </span> <span class="Delimiter">{</span> <span id="L693" class="LineNr"> 693 </span> <span class="Comment"># if either:</span> @@ -887,7 +887,7 @@ if ('onhashchange' in window) { <span id="L826" class="LineNr"> 826 </span> indent?:bool <span id="L827" class="LineNr"> 827 </span>] <span id="L828" class="LineNr"> 828 </span> -<span id="L829" class="LineNr"> 829 </span><span class="muRecipe">after</span> <span class="Constant"><editor-initialization></span> [ +<span id="L829" class="LineNr"> 829 </span><span class="muRecipe">after</span> <span class="Constant"><a href='001-editor.mu.html#L69'><editor-initialization></a></span> [ <span id="L830" class="LineNr"> 830 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">indent?:offset</span>, <span class="Constant">1/true</span> <span id="L831" class="LineNr"> 831 </span>] <span id="L832" class="LineNr"> 832 </span> @@ -911,13 +911,13 @@ if ('onhashchange' in window) { <span id="L850" class="LineNr"> 850 </span> ] <span id="L851" class="LineNr"> 851 </span>] <span id="L852" class="LineNr"> 852 </span> -<span id="L853" class="LineNr"> 853 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L853" class="LineNr"> 853 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L854" class="LineNr"> 854 </span> <span class="Delimiter">{</span> <span id="L855" class="LineNr"> 855 </span> newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L856" class="LineNr"> 856 </span> <span class="muControl">break-unless</span> newline? -<span id="L857" class="LineNr"> 857 </span><span class="Constant"> <insert-enter-begin></span> +<span id="L857" class="LineNr"> 857 </span><span class="Constant"> <a href='002-typing.mu.html#L857'><insert-enter-begin></a></span> <span id="L858" class="LineNr"> 858 </span> <a href='002-typing.mu.html#L864'>insert-new-line-and-indent</a> editor, <a href='../081print.mu.html#L4'>screen</a> -<span id="L859" class="LineNr"> 859 </span><span class="Constant"> <insert-enter-end></span> +<span id="L859" class="LineNr"> 859 </span><span class="Constant"> <a href='002-typing.mu.html#L859'><insert-enter-end></a></span> <span id="L860" class="LineNr"> 860 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L861" class="LineNr"> 861 </span> <span class="Delimiter">}</span> <span id="L862" class="LineNr"> 862 </span>] @@ -1094,7 +1094,7 @@ if ('onhashchange' in window) { <span id="L1033" class="LineNr">1033 </span> ] <span id="L1034" class="LineNr">1034 </span>] <span id="L1035" class="LineNr">1035 </span> -<span id="L1036" class="LineNr">1036 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L1036" class="LineNr">1036 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L1037" class="LineNr">1037 </span> <span class="Delimiter">{</span> <span id="L1038" class="LineNr">1038 </span> paste-start?:bool <span class="Special"><-</span> equal k, <span class="Constant">65507/paste-start</span> <span id="L1039" class="LineNr">1039 </span> <span class="muControl">break-unless</span> paste-start? @@ -1103,7 +1103,7 @@ if ('onhashchange' in window) { <span id="L1042" class="LineNr">1042 </span> <span class="Delimiter">}</span> <span id="L1043" class="LineNr">1043 </span>] <span id="L1044" class="LineNr">1044 </span> -<span id="L1045" class="LineNr">1045 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L1045" class="LineNr">1045 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L1046" class="LineNr">1046 </span> <span class="Delimiter">{</span> <span id="L1047" class="LineNr">1047 </span> paste-end?:bool <span class="Special"><-</span> equal k, <span class="Constant">65506/paste-end</span> <span id="L1048" class="LineNr">1048 </span> <span class="muControl">break-unless</span> paste-end? diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index 77446c2a..078af9cb 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -84,7 +84,7 @@ if ('onhashchange' in window) { <span id="L24" class="LineNr"> 24 </span> ] <span id="L25" class="LineNr"> 25 </span>] <span id="L26" class="LineNr"> 26 </span> -<span id="L27" class="LineNr"> 27 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L27" class="LineNr"> 27 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L28" class="LineNr"> 28 </span> <span class="Delimiter">{</span> <span id="L29" class="LineNr"> 29 </span> tab?:bool <span class="Special"><-</span> equal c, <span class="Constant">9/tab</span> <span id="L30" class="LineNr"> 30 </span> <span class="muControl">break-unless</span> tab? @@ -126,13 +126,13 @@ if ('onhashchange' in window) { <span id="L66" class="LineNr"> 66 </span> check-trace-count-for-label<span class="Constant"> 3</span>, <span class="Constant">[print-character]</span> <span class="Comment"># length of original line to overwrite</span> <span id="L67" class="LineNr"> 67 </span>] <span id="L68" class="LineNr"> 68 </span> -<span id="L69" class="LineNr"> 69 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L69" class="LineNr"> 69 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L70" class="LineNr"> 70 </span> <span class="Delimiter">{</span> <span id="L71" class="LineNr"> 71 </span> delete-previous-character?:bool <span class="Special"><-</span> equal c, <span class="Constant">8/backspace</span> <span id="L72" class="LineNr"> 72 </span> <span class="muControl">break-unless</span> delete-previous-character? -<span id="L73" class="LineNr"> 73 </span><span class="Constant"> <backspace-character-begin></span> +<span id="L73" class="LineNr"> 73 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L73'><backspace-character-begin></a></span> <span id="L74" class="LineNr"> 74 </span> go-render?:bool, backspaced-cell:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L83'>delete-before-cursor</a> editor, <a href='../081print.mu.html#L4'>screen</a> -<span id="L75" class="LineNr"> 75 </span><span class="Constant"> <backspace-character-end></span> +<span id="L75" class="LineNr"> 75 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L75'><backspace-character-end></a></span> <span id="L76" class="LineNr"> 76 </span> <span class="muControl">return</span> <span id="L77" class="LineNr"> 77 </span> <span class="Delimiter">}</span> <span id="L78" class="LineNr"> 78 </span>] @@ -394,13 +394,13 @@ if ('onhashchange' in window) { <span id="L334" class="LineNr"> 334 </span> check-trace-count-for-label<span class="Constant"> 2</span>, <span class="Constant">[print-character]</span> <span class="Comment"># new length to overwrite</span> <span id="L335" class="LineNr"> 335 </span>] <span id="L336" class="LineNr"> 336 </span> -<span id="L337" class="LineNr"> 337 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L337" class="LineNr"> 337 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L338" class="LineNr"> 338 </span> <span class="Delimiter">{</span> <span id="L339" class="LineNr"> 339 </span> delete-next-character?:bool <span class="Special"><-</span> equal k, <span class="Constant">65522/delete</span> <span id="L340" class="LineNr"> 340 </span> <span class="muControl">break-unless</span> delete-next-character? -<span id="L341" class="LineNr"> 341 </span><span class="Constant"> <delete-character-begin></span> +<span id="L341" class="LineNr"> 341 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L341'><delete-character-begin></a></span> <span id="L342" class="LineNr"> 342 </span> go-render?:bool, deleted-cell:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L348'>delete-at-cursor</a> editor, <a href='../081print.mu.html#L4'>screen</a> -<span id="L343" class="LineNr"> 343 </span><span class="Constant"> <delete-character-end></span> +<span id="L343" class="LineNr"> 343 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L343'><delete-character-end></a></span> <span id="L344" class="LineNr"> 344 </span> <span class="muControl">return</span> <span id="L345" class="LineNr"> 345 </span> <span class="Delimiter">}</span> <span id="L346" class="LineNr"> 346 </span>] @@ -467,7 +467,7 @@ if ('onhashchange' in window) { <span id="L407" class="LineNr"> 407 </span> check-trace-count-for-label<span class="Constant"> 3</span>, <span class="Constant">[print-character]</span> <span class="Comment"># 0 and following characters</span> <span id="L408" class="LineNr"> 408 </span>] <span id="L409" class="LineNr"> 409 </span> -<span id="L410" class="LineNr"> 410 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L410" class="LineNr"> 410 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L411" class="LineNr"> 411 </span> <span class="Delimiter">{</span> <span id="L412" class="LineNr"> 412 </span> move-to-next-character?:bool <span class="Special"><-</span> equal k, <span class="Constant">65514/right-arrow</span> <span id="L413" class="LineNr"> 413 </span> <span class="muControl">break-unless</span> move-to-next-character? @@ -751,7 +751,7 @@ if ('onhashchange' in window) { <span id="L691" class="LineNr"> 691 </span> check-trace-count-for-label<span class="Constant"> 3</span>, <span class="Constant">[print-character]</span> <span id="L692" class="LineNr"> 692 </span>] <span id="L693" class="LineNr"> 693 </span> -<span id="L694" class="LineNr"> 694 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L694" class="LineNr"> 694 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L695" class="LineNr"> 695 </span> <span class="Delimiter">{</span> <span id="L696" class="LineNr"> 696 </span> move-to-previous-character?:bool <span class="Special"><-</span> equal k, <span class="Constant">65515/left-arrow</span> <span id="L697" class="LineNr"> 697 </span> <span class="muControl">break-unless</span> move-to-previous-character? @@ -1021,7 +1021,7 @@ if ('onhashchange' in window) { <span id="L961" class="LineNr"> 961 </span> ] <span id="L962" class="LineNr"> 962 </span>] <span id="L963" class="LineNr"> 963 </span> -<span id="L964" class="LineNr"> 964 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L964" class="LineNr"> 964 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L965" class="LineNr"> 965 </span> <span class="Delimiter">{</span> <span id="L966" class="LineNr"> 966 </span> move-to-previous-line?:bool <span class="Special"><-</span> equal k, <span class="Constant">65517/up-arrow</span> <span id="L967" class="LineNr"> 967 </span> <span class="muControl">break-unless</span> move-to-previous-line? @@ -1252,7 +1252,7 @@ if ('onhashchange' in window) { <span id="L1192" class="LineNr">1192 </span> ] <span id="L1193" class="LineNr">1193 </span>] <span id="L1194" class="LineNr">1194 </span> -<span id="L1195" class="LineNr">1195 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L1195" class="LineNr">1195 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L1196" class="LineNr">1196 </span> <span class="Delimiter">{</span> <span id="L1197" class="LineNr">1197 </span> move-to-next-line?:bool <span class="Special"><-</span> equal k, <span class="Constant">65516/down-arrow</span> <span id="L1198" class="LineNr">1198 </span> <span class="muControl">break-unless</span> move-to-next-line? @@ -1383,7 +1383,7 @@ if ('onhashchange' in window) { <span id="L1323" class="LineNr">1323 </span> check-trace-count-for-label<span class="Constant"> 0</span>, <span class="Constant">[print-character]</span> <span id="L1324" class="LineNr">1324 </span>] <span id="L1325" class="LineNr">1325 </span> -<span id="L1326" class="LineNr">1326 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L1326" class="LineNr">1326 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L1327" class="LineNr">1327 </span> <span class="Delimiter">{</span> <span id="L1328" class="LineNr">1328 </span> move-to-start-of-line?:bool <span class="Special"><-</span> equal c, <span class="Constant">1/ctrl-a</span> <span id="L1329" class="LineNr">1329 </span> <span class="muControl">break-unless</span> move-to-start-of-line? @@ -1395,7 +1395,7 @@ if ('onhashchange' in window) { <span id="L1335" class="LineNr">1335 </span> <span class="Delimiter">}</span> <span id="L1336" class="LineNr">1336 </span>] <span id="L1337" class="LineNr">1337 </span> -<span id="L1338" class="LineNr">1338 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L1338" class="LineNr">1338 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L1339" class="LineNr">1339 </span> <span class="Delimiter">{</span> <span id="L1340" class="LineNr">1340 </span> move-to-start-of-line?:bool <span class="Special"><-</span> equal k, <span class="Constant">65521/home</span> <span id="L1341" class="LineNr">1341 </span> <span class="muControl">break-unless</span> move-to-start-of-line? @@ -1557,7 +1557,7 @@ if ('onhashchange' in window) { <span id="L1497" class="LineNr">1497 </span> check-trace-count-for-label<span class="Constant"> 1</span>, <span class="Constant">[print-character]</span> <span id="L1498" class="LineNr">1498 </span>] <span id="L1499" class="LineNr">1499 </span> -<span id="L1500" class="LineNr">1500 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L1500" class="LineNr">1500 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L1501" class="LineNr">1501 </span> <span class="Delimiter">{</span> <span id="L1502" class="LineNr">1502 </span> move-to-end-of-line?:bool <span class="Special"><-</span> equal c, <span class="Constant">5/ctrl-e</span> <span id="L1503" class="LineNr">1503 </span> <span class="muControl">break-unless</span> move-to-end-of-line? @@ -1569,7 +1569,7 @@ if ('onhashchange' in window) { <span id="L1509" class="LineNr">1509 </span> <span class="Delimiter">}</span> <span id="L1510" class="LineNr">1510 </span>] <span id="L1511" class="LineNr">1511 </span> -<span id="L1512" class="LineNr">1512 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L1512" class="LineNr">1512 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L1513" class="LineNr">1513 </span> <span class="Delimiter">{</span> <span id="L1514" class="LineNr">1514 </span> move-to-end-of-line?:bool <span class="Special"><-</span> equal k, <span class="Constant">65520/end</span> <span id="L1515" class="LineNr">1515 </span> <span class="muControl">break-unless</span> move-to-end-of-line? @@ -1705,13 +1705,13 @@ if ('onhashchange' in window) { <span id="L1645" class="LineNr">1645 </span> ] <span id="L1646" class="LineNr">1646 </span>] <span id="L1647" class="LineNr">1647 </span> -<span id="L1648" class="LineNr">1648 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L1648" class="LineNr">1648 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L1649" class="LineNr">1649 </span> <span class="Delimiter">{</span> <span id="L1650" class="LineNr">1650 </span> delete-to-start-of-line?:bool <span class="Special"><-</span> equal c, <span class="Constant">21/ctrl-u</span> <span id="L1651" class="LineNr">1651 </span> <span class="muControl">break-unless</span> delete-to-start-of-line? -<span id="L1652" class="LineNr">1652 </span><span class="Constant"> <delete-to-start-of-line-begin></span> +<span id="L1652" class="LineNr">1652 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L1652'><delete-to-start-of-line-begin></a></span> <span id="L1653" class="LineNr">1653 </span> deleted-cells:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1659'>delete-to-start-of-line</a> editor -<span id="L1654" class="LineNr">1654 </span><span class="Constant"> <delete-to-start-of-line-end></span> +<span id="L1654" class="LineNr">1654 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L1654'><delete-to-start-of-line-end></a></span> <span id="L1655" class="LineNr">1655 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L1656" class="LineNr">1656 </span> <span class="Delimiter">}</span> <span id="L1657" class="LineNr">1657 </span>] @@ -1842,13 +1842,13 @@ if ('onhashchange' in window) { <span id="L1782" class="LineNr">1782 </span> ] <span id="L1783" class="LineNr">1783 </span>] <span id="L1784" class="LineNr">1784 </span> -<span id="L1785" class="LineNr">1785 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L1785" class="LineNr">1785 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L1786" class="LineNr">1786 </span> <span class="Delimiter">{</span> <span id="L1787" class="LineNr">1787 </span> delete-to-end-of-line?:bool <span class="Special"><-</span> equal c, <span class="Constant">11/ctrl-k</span> <span id="L1788" class="LineNr">1788 </span> <span class="muControl">break-unless</span> delete-to-end-of-line? -<span id="L1789" class="LineNr">1789 </span><span class="Constant"> <delete-to-end-of-line-begin></span> +<span id="L1789" class="LineNr">1789 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L1789'><delete-to-end-of-line-begin></a></span> <span id="L1790" class="LineNr">1790 </span> deleted-cells:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1796'>delete-to-end-of-line</a> editor -<span id="L1791" class="LineNr">1791 </span><span class="Constant"> <delete-to-end-of-line-end></span> +<span id="L1791" class="LineNr">1791 </span><span class="Constant"> <a href='003-shortcuts.mu.html#L1791'><delete-to-end-of-line-end></a></span> <span id="L1792" class="LineNr">1792 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L1793" class="LineNr">1793 </span> <span class="Delimiter">}</span> <span id="L1794" class="LineNr">1794 </span>] @@ -2814,7 +2814,7 @@ if ('onhashchange' in window) { <span id="L2754" class="LineNr">2754 </span> ] <span id="L2755" class="LineNr">2755 </span>] <span id="L2756" class="LineNr">2756 </span> -<span id="L2757" class="LineNr">2757 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L2757" class="LineNr">2757 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L2758" class="LineNr">2758 </span> <span class="Delimiter">{</span> <span id="L2759" class="LineNr">2759 </span> page-down?:bool <span class="Special"><-</span> equal c, <span class="Constant">6/ctrl-f</span> <span id="L2760" class="LineNr">2760 </span> <span class="muControl">break-unless</span> page-down? @@ -2829,7 +2829,7 @@ if ('onhashchange' in window) { <span id="L2769" class="LineNr">2769 </span> <span class="Delimiter">}</span> <span id="L2770" class="LineNr">2770 </span>] <span id="L2771" class="LineNr">2771 </span> -<span id="L2772" class="LineNr">2772 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L2772" class="LineNr">2772 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L2773" class="LineNr">2773 </span> <span class="Delimiter">{</span> <span id="L2774" class="LineNr">2774 </span> page-down?:bool <span class="Special"><-</span> equal k, <span class="Constant">65518/page-down</span> <span id="L2775" class="LineNr">2775 </span> <span class="muControl">break-unless</span> page-down? @@ -3013,7 +3013,7 @@ if ('onhashchange' in window) { <span id="L2953" class="LineNr">2953 </span> ] <span id="L2954" class="LineNr">2954 </span>] <span id="L2955" class="LineNr">2955 </span> -<span id="L2956" class="LineNr">2956 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L2956" class="LineNr">2956 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L2957" class="LineNr">2957 </span> <span class="Delimiter">{</span> <span id="L2958" class="LineNr">2958 </span> page-up?:bool <span class="Special"><-</span> equal c, <span class="Constant">2/ctrl-b</span> <span id="L2959" class="LineNr">2959 </span> <span class="muControl">break-unless</span> page-up? @@ -3028,7 +3028,7 @@ if ('onhashchange' in window) { <span id="L2968" class="LineNr">2968 </span> <span class="Delimiter">}</span> <span id="L2969" class="LineNr">2969 </span>] <span id="L2970" class="LineNr">2970 </span> -<span id="L2971" class="LineNr">2971 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-key></span> [ +<span id="L2971" class="LineNr">2971 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L197'><handle-special-key></a></span> [ <span id="L2972" class="LineNr">2972 </span> <span class="Delimiter">{</span> <span id="L2973" class="LineNr">2973 </span> page-up?:bool <span class="Special"><-</span> equal k, <span class="Constant">65519/page-up</span> <span id="L2974" class="LineNr">2974 </span> <span class="muControl">break-unless</span> page-up? diff --git a/html/edit/004-programming-environment.mu.html b/html/edit/004-programming-environment.mu.html index 2ae4fb29..31bf0534 100644 --- a/html/edit/004-programming-environment.mu.html +++ b/html/edit/004-programming-environment.mu.html @@ -94,7 +94,7 @@ if ('onhashchange' in window) { <span id="L33" class="LineNr"> 33 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">recipes:offset</span>, recipes <span id="L34" class="LineNr"> 34 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">current-sandbox:offset</span>, current-sandbox <span id="L35" class="LineNr"> 35 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">sandbox-in-focus?:offset</span>, <span class="Constant">0/false</span> -<span id="L36" class="LineNr"> 36 </span><span class="Constant"> <programming-environment-initialization></span> +<span id="L36" class="LineNr"> 36 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L36'><programming-environment-initialization></a></span> <span id="L37" class="LineNr"> 37 </span>] <span id="L38" class="LineNr"> 38 </span> <span id="L39" class="LineNr"> 39 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>:&:<a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>:&:<a href='../084console.mu.html#L23'>console</a>, env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a><span class="muRecipe"> -> </span><a href='../081print.mu.html#L4'>screen</a>:&:<a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>:&:<a href='../084console.mu.html#L23'>console</a>, env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a> [ @@ -114,17 +114,17 @@ if ('onhashchange' in window) { <span id="L53" class="LineNr"> 53 </span> <span class="muControl">loop-unless</span> found? <span id="L54" class="LineNr"> 54 </span> <span class="muControl">break-if</span> quit? <span class="Comment"># only in tests</span> <span id="L55" class="LineNr"> 55 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[next-event]</span> -<span id="L56" class="LineNr"> 56 </span><span class="Constant"> <handle-event></span> +<span id="L56" class="LineNr"> 56 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L56'><handle-event></a></span> <span id="L57" class="LineNr"> 57 </span> <span class="Comment"># check for global events that will trigger regardless of which editor has focus</span> <span id="L58" class="LineNr"> 58 </span> <span class="Delimiter">{</span> <span id="L59" class="LineNr"> 59 </span> k:num, is-keycode?:bool <span class="Special"><-</span> maybe-convert e:<a href='../084console.mu.html#L4'>event</a>, <span class="Constant">keycode:variant</span> <span id="L60" class="LineNr"> 60 </span> <span class="muControl">break-unless</span> is-keycode? -<span id="L61" class="LineNr"> 61 </span><span class="Constant"> <global-keypress></span> +<span id="L61" class="LineNr"> 61 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L61'><global-keypress></a></span> <span id="L62" class="LineNr"> 62 </span> <span class="Delimiter">}</span> <span id="L63" class="LineNr"> 63 </span> <span class="Delimiter">{</span> <span id="L64" class="LineNr"> 64 </span> c:char, is-unicode?:bool <span class="Special"><-</span> maybe-convert e:<a href='../084console.mu.html#L4'>event</a>, <span class="Constant">text:variant</span> <span id="L65" class="LineNr"> 65 </span> <span class="muControl">break-unless</span> is-unicode? -<span id="L66" class="LineNr"> 66 </span><span class="Constant"> <global-type></span> +<span id="L66" class="LineNr"> 66 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L66'><global-type></a></span> <span id="L67" class="LineNr"> 67 </span> <span class="Delimiter">}</span> <span id="L68" class="LineNr"> 68 </span> <span class="Comment"># 'touch' event - send to both sides, see what picks it up</span> <span id="L69" class="LineNr"> 69 </span> <span class="Delimiter">{</span> @@ -138,7 +138,7 @@ if ('onhashchange' in window) { <span id="L77" class="LineNr"> 77 </span> click-row:num <span class="Special"><-</span> get t, <span class="Constant">row:offset</span> <span id="L78" class="LineNr"> 78 </span> click-column:num <span class="Special"><-</span> get t, <span class="Constant">column:offset</span> <span id="L79" class="LineNr"> 79 </span> <span class="Comment"># later exceptions for non-editor touches will go here</span> -<span id="L80" class="LineNr"> 80 </span><span class="Constant"> <global-touch></span> +<span id="L80" class="LineNr"> 80 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L80'><global-touch></a></span> <span id="L81" class="LineNr"> 81 </span> <span class="Comment"># send to both editors</span> <span id="L82" class="LineNr"> 82 </span> _ <span class="Special"><-</span> <a href='002-typing.mu.html#L48'>move-cursor-in-editor</a> <a href='../081print.mu.html#L4'>screen</a>, recipes, t <span id="L83" class="LineNr"> 83 </span> sandbox-in-focus?:bool <span class="Special"><-</span> <a href='002-typing.mu.html#L48'>move-cursor-in-editor</a> <a href='../081print.mu.html#L4'>screen</a>, current-sandbox, t @@ -525,7 +525,7 @@ if ('onhashchange' in window) { <span id="L464" class="LineNr">464 </span> <span class="Comment">#</span> <span id="L465" class="LineNr">465 </span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L477'>render-recipes</a> <a href='../081print.mu.html#L4'>screen</a>, env, render-editor <span id="L466" class="LineNr">466 </span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L496'>render-sandbox-side</a> <a href='../081print.mu.html#L4'>screen</a>, env, render-editor -<span id="L467" class="LineNr">467 </span><span class="Constant"> <render-components-end></span> +<span id="L467" class="LineNr">467 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L467'><render-components-end></a></span> <span id="L468" class="LineNr">468 </span> <span class="Comment">#</span> <span id="L469" class="LineNr">469 </span> recipes:&:editor <span class="Special"><-</span> get *env, <span class="Constant">recipes:offset</span> <span id="L470" class="LineNr">470 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> @@ -546,7 +546,7 @@ if ('onhashchange' in window) { <span id="L485" class="LineNr">485 </span> row:num, column:num, <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> call render-editor, <a href='../081print.mu.html#L4'>screen</a>, recipes <span id="L486" class="LineNr">486 </span> <a href='../081print.mu.html#L408'>clear-line-until</a> <a href='../081print.mu.html#L4'>screen</a>, right <span id="L487" class="LineNr">487 </span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> -<span id="L488" class="LineNr">488 </span><span class="Constant"> <render-recipe-components-end></span> +<span id="L488" class="LineNr">488 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L488'><render-recipe-components-end></a></span> <span id="L489" class="LineNr">489 </span> <span class="Comment"># draw dotted line after recipes</span> <span id="L490" class="LineNr">490 </span> <a href='002-typing.mu.html#L1056'>draw-horizontal</a> <a href='../081print.mu.html#L4'>screen</a>, row, left, right, <span class="Constant">9480/horizontal-dotted</span> <span id="L491" class="LineNr">491 </span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> @@ -572,7 +572,7 @@ if ('onhashchange' in window) { <span id="L511" class="LineNr">511 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L511'>update-cursor</a> <a href='../081print.mu.html#L4'>screen</a>:&:<a href='../081print.mu.html#L4'>screen</a>, recipes:&:editor, current-sandbox:&:editor, sandbox-in-focus?:bool, env:&:environment<span class="muRecipe"> -> </span><a href='../081print.mu.html#L4'>screen</a>:&:<a href='../081print.mu.html#L4'>screen</a> [ <span id="L512" class="LineNr">512 </span> <span class="Constant">local-scope</span> <span id="L513" class="LineNr">513 </span> <span class="Constant">load-ingredients</span> -<span id="L514" class="LineNr">514 </span><span class="Constant"> <update-cursor-special-cases></span> +<span id="L514" class="LineNr">514 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L514'><update-cursor-special-cases></a></span> <span id="L515" class="LineNr">515 </span> <span class="Delimiter">{</span> <span id="L516" class="LineNr">516 </span> <span class="muControl">break-if</span> sandbox-in-focus? <span id="L517" class="LineNr">517 </span> cursor-row:num <span class="Special"><-</span> get *recipes, <span class="Constant">cursor-row:offset</span> @@ -651,7 +651,7 @@ if ('onhashchange' in window) { <span id="L590" class="LineNr">590 </span> <span id="L591" class="LineNr">591 </span><span class="Comment"># ctrl-l - redraw screen (just in case it printed junk somehow)</span> <span id="L592" class="LineNr">592 </span> -<span id="L593" class="LineNr">593 </span><span class="muRecipe">after</span> <span class="Constant"><global-type></span> [ +<span id="L593" class="LineNr">593 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L66'><global-type></a></span> [ <span id="L594" class="LineNr">594 </span> <span class="Delimiter">{</span> <span id="L595" class="LineNr">595 </span> redraw-screen?:bool <span class="Special"><-</span> equal c, <span class="Constant">12/ctrl-l</span> <span id="L596" class="LineNr">596 </span> <span class="muControl">break-unless</span> redraw-screen? @@ -664,7 +664,7 @@ if ('onhashchange' in window) { <span id="L603" class="LineNr">603 </span><span class="Comment"># ctrl-n - switch focus</span> <span id="L604" class="LineNr">604 </span><span class="Comment"># todo: test this</span> <span id="L605" class="LineNr">605 </span> -<span id="L606" class="LineNr">606 </span><span class="muRecipe">after</span> <span class="Constant"><global-type></span> [ +<span id="L606" class="LineNr">606 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L66'><global-type></a></span> [ <span id="L607" class="LineNr">607 </span> <span class="Delimiter">{</span> <span id="L608" class="LineNr">608 </span> switch-side?:bool <span class="Special"><-</span> equal c, <span class="Constant">14/ctrl-n</span> <span id="L609" class="LineNr">609 </span> <span class="muControl">break-unless</span> switch-side? diff --git a/html/edit/005-sandbox.mu.html b/html/edit/005-sandbox.mu.html index 14e49d55..5c940763 100644 --- a/html/edit/005-sandbox.mu.html +++ b/html/edit/005-sandbox.mu.html @@ -84,7 +84,7 @@ if ('onhashchange' in window) { <span id="L23" class="LineNr"> 23 </span> number-of-sandboxes:num <span id="L24" class="LineNr"> 24 </span>] <span id="L25" class="LineNr"> 25 </span> -<span id="L26" class="LineNr"> 26 </span><span class="muRecipe">after</span> <span class="Constant"><programming-environment-initialization></span> [ +<span id="L26" class="LineNr"> 26 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L36'><programming-environment-initialization></a></span> [ <span id="L27" class="LineNr"> 27 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">render-from:offset</span>,<span class="Constant"> -1</span> <span id="L28" class="LineNr"> 28 </span>] <span id="L29" class="LineNr"> 29 </span> @@ -183,7 +183,7 @@ if ('onhashchange' in window) { <span id="L122" class="LineNr"> 122 </span> ] <span id="L123" class="LineNr"> 123 </span>] <span id="L124" class="LineNr"> 124 </span> -<span id="L125" class="LineNr"> 125 </span><span class="muRecipe">after</span> <span class="Constant"><global-keypress></span> [ +<span id="L125" class="LineNr"> 125 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L61'><global-keypress></a></span> [ <span id="L126" class="LineNr"> 126 </span> <span class="Comment"># F4? load all code and run all sandboxes.</span> <span id="L127" class="LineNr"> 127 </span> <span class="Delimiter">{</span> <span id="L128" class="LineNr"> 128 </span> do-run?:bool <span class="Special"><-</span> equal k, <span class="Constant">65532/F4</span> @@ -207,7 +207,7 @@ if ('onhashchange' in window) { <span id="L146" class="LineNr"> 146 </span> errors-found?:bool <span class="Special"><-</span> <a href='005-sandbox.mu.html#L188'>update-recipes</a> env, <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a> <span id="L147" class="LineNr"> 147 </span> <span class="muControl">return-if</span> errors-found? <span id="L148" class="LineNr"> 148 </span> <span class="Comment"># check contents of right editor (sandbox)</span> -<span id="L149" class="LineNr"> 149 </span><span class="Constant"> <run-sandboxes-begin></span> +<span id="L149" class="LineNr"> 149 </span><span class="Constant"> <a href='005-sandbox.mu.html#L149'><run-sandboxes-begin></a></span> <span id="L150" class="LineNr"> 150 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> <span id="L151" class="LineNr"> 151 </span> <span class="Delimiter">{</span> <span id="L152" class="LineNr"> 152 </span> sandbox-contents:text <span class="Special"><-</span> <a href='005-sandbox.mu.html#L609'>editor-contents</a> current-sandbox @@ -241,7 +241,7 @@ if ('onhashchange' in window) { <span id="L180" class="LineNr"> 180 </span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> <span id="L181" class="LineNr"> 181 </span> <span class="muControl">loop</span> <span id="L182" class="LineNr"> 182 </span> <span class="Delimiter">}</span> -<span id="L183" class="LineNr"> 183 </span><span class="Constant"> <run-sandboxes-end></span> +<span id="L183" class="LineNr"> 183 </span><span class="Constant"> <a href='005-sandbox.mu.html#L183'><run-sandboxes-end></a></span> <span id="L184" class="LineNr"> 184 </span>] <span id="L185" class="LineNr"> 185 </span> <span id="L186" class="LineNr"> 186 </span><span class="Comment"># load code from disk</span> @@ -286,7 +286,7 @@ if ('onhashchange' in window) { <span id="L225" class="LineNr"> 225 </span> data:text <span class="Special"><-</span> get *curr, <span class="Constant">data:offset</span> <span id="L226" class="LineNr"> 226 </span> filename:text <span class="Special"><-</span> append <span class="Constant">[lesson/]</span>, idx <span id="L227" class="LineNr"> 227 </span> <a href='../088file.mu.html#L11'>resources</a> <span class="Special"><-</span> <a href='../088file.mu.html#L127'>dump</a> <a href='../088file.mu.html#L11'>resources</a>, filename, data -<span id="L228" class="LineNr"> 228 </span><span class="Constant"> <end-save-sandbox></span> +<span id="L228" class="LineNr"> 228 </span><span class="Constant"> <a href='005-sandbox.mu.html#L228'><end-save-sandbox></a></span> <span id="L229" class="LineNr"> 229 </span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> <span id="L230" class="LineNr"> 230 </span> curr <span class="Special"><-</span> get *curr, <span class="Constant">next-sandbox:offset</span> <span id="L231" class="LineNr"> 231 </span> <span class="muControl">loop</span> @@ -341,7 +341,7 @@ if ('onhashchange' in window) { <span id="L280" class="LineNr"> 280 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">code-ending-row-on-screen:offset</span>, row <span id="L281" class="LineNr"> 281 </span> <span class="Comment"># render sandbox warnings, screen or response, in that order</span> <span id="L282" class="LineNr"> 282 </span> sandbox-response:text <span class="Special"><-</span> get *sandbox, <span class="Constant">response:offset</span> -<span id="L283" class="LineNr"> 283 </span><span class="Constant"> <render-sandbox-results></span> +<span id="L283" class="LineNr"> 283 </span><span class="Constant"> <a href='005-sandbox.mu.html#L283'><render-sandbox-results></a></span> <span id="L284" class="LineNr"> 284 </span> <span class="Delimiter">{</span> <span id="L285" class="LineNr"> 285 </span> sandbox-screen:&:<a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> get *sandbox, <span class="Constant"><a href='../081print.mu.html#L4'>screen</a>:offset</span> <span id="L286" class="LineNr"> 286 </span> empty-screen?:bool <span class="Special"><-</span> <a href='../081print.mu.html#L60'>fake-screen-is-empty?</a> sandbox-screen @@ -350,7 +350,7 @@ if ('onhashchange' in window) { <span id="L289" class="LineNr"> 289 </span> <span class="Delimiter">}</span> <span id="L290" class="LineNr"> 290 </span> <span class="Delimiter">{</span> <span id="L291" class="LineNr"> 291 </span> <span class="muControl">break-unless</span> empty-screen? -<span id="L292" class="LineNr"> 292 </span><span class="Constant"> <render-sandbox-response></span> +<span id="L292" class="LineNr"> 292 </span><span class="Constant"> <a href='005-sandbox.mu.html#L292'><render-sandbox-response></a></span> <span id="L293" class="LineNr"> 293 </span> row, <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L356'>render-text</a> <a href='../081print.mu.html#L4'>screen</a>, sandbox-response, left, right, <span class="Constant">245/grey</span>, row <span id="L294" class="LineNr"> 294 </span> <span class="Delimiter">}</span> <span id="L295" class="LineNr"> 295 </span><span class="Constant"> +render-sandbox-end</span> @@ -364,7 +364,7 @@ if ('onhashchange' in window) { <span id="L303" class="LineNr"> 303 </span> <span class="muControl">break-unless</span> hidden? <span id="L304" class="LineNr"> 304 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">starting-row-on-screen:offset</span>,<span class="Constant"> 0</span> <span id="L305" class="LineNr"> 305 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">code-ending-row-on-screen:offset</span>,<span class="Constant"> 0</span> -<span id="L306" class="LineNr"> 306 </span><span class="Constant"> <end-render-sandbox-reset-hidden></span> +<span id="L306" class="LineNr"> 306 </span><span class="Constant"> <a href='005-sandbox.mu.html#L306'><end-render-sandbox-reset-hidden></a></span> <span id="L307" class="LineNr"> 307 </span> <span class="Delimiter">}</span> <span id="L308" class="LineNr"> 308 </span> <span class="Comment"># draw next sandbox</span> <span id="L309" class="LineNr"> 309 </span> next-sandbox:&:sandbox <span class="Special"><-</span> get *sandbox, <span class="Constant">next-sandbox:offset</span> @@ -490,7 +490,7 @@ if ('onhashchange' in window) { <span id="L429" class="LineNr"> 429 </span> <span class="Comment"># create new sandbox for file</span> <span id="L430" class="LineNr"> 430 </span> curr <span class="Special"><-</span> new <span class="Constant">sandbox:type</span> <span id="L431" class="LineNr"> 431 </span> *curr <span class="Special"><-</span> put *curr, <span class="Constant">data:offset</span>, contents -<span id="L432" class="LineNr"> 432 </span><span class="Constant"> <end-restore-sandbox></span> +<span id="L432" class="LineNr"> 432 </span><span class="Constant"> <a href='005-sandbox.mu.html#L432'><end-restore-sandbox></a></span> <span id="L433" class="LineNr"> 433 </span> <span class="Delimiter">{</span> <span id="L434" class="LineNr"> 434 </span> <span class="muControl">break-if</span> idx <span id="L435" class="LineNr"> 435 </span> *env <span class="Special"><-</span> put *env, <span class="Constant">sandbox:offset</span>, curr @@ -762,11 +762,11 @@ if ('onhashchange' in window) { <span id="L701" class="LineNr"> 701 </span> recipe-bottom:num <span id="L702" class="LineNr"> 702 </span>] <span id="L703" class="LineNr"> 703 </span> -<span id="L704" class="LineNr"> 704 </span><span class="muRecipe">after</span> <span class="Constant"><render-recipe-components-end></span> [ +<span id="L704" class="LineNr"> 704 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L488'><render-recipe-components-end></a></span> [ <span id="L705" class="LineNr"> 705 </span> *env <span class="Special"><-</span> put *env, <span class="Constant">recipe-bottom:offset</span>, row <span id="L706" class="LineNr"> 706 </span>] <span id="L707" class="LineNr"> 707 </span> -<span id="L708" class="LineNr"> 708 </span><span class="muRecipe">after</span> <span class="Constant"><global-keypress></span> [ +<span id="L708" class="LineNr"> 708 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L61'><global-keypress></a></span> [ <span id="L709" class="LineNr"> 709 </span> <span class="Delimiter">{</span> <span id="L710" class="LineNr"> 710 </span> <span class="muControl">break-if</span> sandbox-in-focus? <span id="L711" class="LineNr"> 711 </span> down-arrow?:bool <span class="Special"><-</span> equal k, <span class="Constant">65516/down-arrow</span> @@ -790,7 +790,7 @@ if ('onhashchange' in window) { <span id="L729" class="LineNr"> 729 </span> <span class="Delimiter">}</span> <span id="L730" class="LineNr"> 730 </span>] <span id="L731" class="LineNr"> 731 </span> -<span id="L732" class="LineNr"> 732 </span><span class="muRecipe">after</span> <span class="Constant"><global-type></span> [ +<span id="L732" class="LineNr"> 732 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L66'><global-type></a></span> [ <span id="L733" class="LineNr"> 733 </span> <span class="Delimiter">{</span> <span id="L734" class="LineNr"> 734 </span> <span class="muControl">break-if</span> sandbox-in-focus? <span id="L735" class="LineNr"> 735 </span> page-down?:bool <span class="Special"><-</span> equal k, <span class="Constant">6/ctrl-f</span> @@ -928,7 +928,7 @@ if ('onhashchange' in window) { <span id="L867" class="LineNr"> 867 </span>] <span id="L868" class="LineNr"> 868 </span> <span id="L869" class="LineNr"> 869 </span><span class="Comment"># page-down on sandbox side updates render-from to scroll sandboxes</span> -<span id="L870" class="LineNr"> 870 </span><span class="muRecipe">after</span> <span class="Constant"><global-keypress></span> [ +<span id="L870" class="LineNr"> 870 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L61'><global-keypress></a></span> [ <span id="L871" class="LineNr"> 871 </span> <span class="Delimiter">{</span> <span id="L872" class="LineNr"> 872 </span> <span class="muControl">break-unless</span> sandbox-in-focus? <span id="L873" class="LineNr"> 873 </span> page-down?:bool <span class="Special"><-</span> equal k, <span class="Constant">65518/page-down</span> @@ -953,7 +953,7 @@ if ('onhashchange' in window) { <span id="L892" class="LineNr"> 892 </span>] <span id="L893" class="LineNr"> 893 </span> <span id="L894" class="LineNr"> 894 </span><span class="Comment"># update-cursor takes render-from into account</span> -<span id="L895" class="LineNr"> 895 </span><span class="muRecipe">after</span> <span class="Constant"><update-cursor-special-cases></span> [ +<span id="L895" class="LineNr"> 895 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L514'><update-cursor-special-cases></a></span> [ <span id="L896" class="LineNr"> 896 </span> <span class="Delimiter">{</span> <span id="L897" class="LineNr"> 897 </span> <span class="muControl">break-unless</span> sandbox-in-focus? <span id="L898" class="LineNr"> 898 </span> render-from:num <span class="Special"><-</span> get *env, <span class="Constant">render-from:offset</span> @@ -966,7 +966,7 @@ if ('onhashchange' in window) { <span id="L905" class="LineNr"> 905 </span>] <span id="L906" class="LineNr"> 906 </span> <span id="L907" class="LineNr"> 907 </span><span class="Comment"># 'page-up' on sandbox side is like 'page-down': updates render-from when necessary</span> -<span id="L908" class="LineNr"> 908 </span><span class="muRecipe">after</span> <span class="Constant"><global-keypress></span> [ +<span id="L908" class="LineNr"> 908 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L61'><global-keypress></a></span> [ <span id="L909" class="LineNr"> 909 </span> <span class="Delimiter">{</span> <span id="L910" class="LineNr"> 910 </span> <span class="muControl">break-unless</span> sandbox-in-focus? <span id="L911" class="LineNr"> 911 </span> page-up?:bool <span class="Special"><-</span> equal k, <span class="Constant">65519/page-up</span> diff --git a/html/edit/006-sandbox-copy.mu.html b/html/edit/006-sandbox-copy.mu.html index dec7b976..7810c2b3 100644 --- a/html/edit/006-sandbox-copy.mu.html +++ b/html/edit/006-sandbox-copy.mu.html @@ -181,7 +181,7 @@ if ('onhashchange' in window) { <span id="L121" class="LineNr">121 </span> ] <span id="L122" class="LineNr">122 </span>] <span id="L123" class="LineNr">123 </span> -<span id="L124" class="LineNr">124 </span><span class="muRecipe">after</span> <span class="Constant"><global-touch></span> [ +<span id="L124" class="LineNr">124 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L80'><global-touch></a></span> [ <span id="L125" class="LineNr">125 </span> <span class="Comment"># support 'copy' button</span> <span id="L126" class="LineNr">126 </span> <span class="Delimiter">{</span> <span id="L127" class="LineNr">127 </span> copy?:bool <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L140'>should-attempt-copy?</a> click-row, click-column, env diff --git a/html/edit/007-sandbox-delete.mu.html b/html/edit/007-sandbox-delete.mu.html index 6da7f3da..ab5dac63 100644 --- a/html/edit/007-sandbox-delete.mu.html +++ b/html/edit/007-sandbox-delete.mu.html @@ -125,7 +125,7 @@ if ('onhashchange' in window) { <span id="L65" class="LineNr"> 65 </span> ] <span id="L66" class="LineNr"> 66 </span>] <span id="L67" class="LineNr"> 67 </span> -<span id="L68" class="LineNr"> 68 </span><span class="muRecipe">after</span> <span class="Constant"><global-touch></span> [ +<span id="L68" class="LineNr"> 68 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L80'><global-touch></a></span> [ <span id="L69" class="LineNr"> 69 </span> <span class="Comment"># support 'delete' button</span> <span id="L70" class="LineNr"> 70 </span> <span class="Delimiter">{</span> <span id="L71" class="LineNr"> 71 </span> delete?:bool <span class="Special"><-</span> <a href='007-sandbox-delete.mu.html#L84'>should-attempt-delete?</a> click-row, click-column, env diff --git a/html/edit/008-sandbox-edit.mu.html b/html/edit/008-sandbox-edit.mu.html index 014c939e..70f0141f 100644 --- a/html/edit/008-sandbox-edit.mu.html +++ b/html/edit/008-sandbox-edit.mu.html @@ -164,7 +164,7 @@ if ('onhashchange' in window) { <span id="L104" class="LineNr">104 </span> ] <span id="L105" class="LineNr">105 </span>] <span id="L106" class="LineNr">106 </span> -<span id="L107" class="LineNr">107 </span><span class="muRecipe">after</span> <span class="Constant"><global-touch></span> [ +<span id="L107" class="LineNr">107 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L80'><global-touch></a></span> [ <span id="L108" class="LineNr">108 </span> <span class="Comment"># support 'edit' button</span> <span id="L109" class="LineNr">109 </span> <span class="Delimiter">{</span> <span id="L110" class="LineNr">110 </span> edit?:bool <span class="Special"><-</span> <a href='008-sandbox-edit.mu.html#L123'>should-attempt-edit?</a> click-row, click-column, env diff --git a/html/edit/009-sandbox-test.mu.html b/html/edit/009-sandbox-test.mu.html index e0edd9a7..c2774b98 100644 --- a/html/edit/009-sandbox-test.mu.html +++ b/html/edit/009-sandbox-test.mu.html @@ -153,7 +153,7 @@ if ('onhashchange' in window) { <span id="L92" class="LineNr"> 92 </span>] <span id="L93" class="LineNr"> 93 </span> <span id="L94" class="LineNr"> 94 </span><span class="Comment"># include expected response when saving or restoring a sandbox</span> -<span id="L95" class="LineNr"> 95 </span><span class="muRecipe">before</span> <span class="Constant"><end-save-sandbox></span> [ +<span id="L95" class="LineNr"> 95 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L228'><end-save-sandbox></a></span> [ <span id="L96" class="LineNr"> 96 </span> <span class="Delimiter">{</span> <span id="L97" class="LineNr"> 97 </span> expected-response:text <span class="Special"><-</span> get *curr, <span class="Constant">expected-response:offset</span> <span id="L98" class="LineNr"> 98 </span> <span class="muControl">break-unless</span> expected-response @@ -162,7 +162,7 @@ if ('onhashchange' in window) { <span id="L101" class="LineNr">101 </span> <span class="Delimiter">}</span> <span id="L102" class="LineNr">102 </span>] <span id="L103" class="LineNr">103 </span> -<span id="L104" class="LineNr">104 </span><span class="muRecipe">before</span> <span class="Constant"><end-restore-sandbox></span> [ +<span id="L104" class="LineNr">104 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L432'><end-restore-sandbox></a></span> [ <span id="L105" class="LineNr">105 </span> <span class="Delimiter">{</span> <span id="L106" class="LineNr">106 </span> filename <span class="Special"><-</span> append filename, <span class="Constant">[.out]</span> <span id="L107" class="LineNr">107 </span> contents <span class="Special"><-</span> <a href='../088file.mu.html#L38'>slurp</a> <a href='../088file.mu.html#L11'>resources</a>, filename @@ -172,7 +172,7 @@ if ('onhashchange' in window) { <span id="L111" class="LineNr">111 </span>] <span id="L112" class="LineNr">112 </span> <span id="L113" class="LineNr">113 </span><span class="Comment"># clicks on sandbox responses save it as 'expected'</span> -<span id="L114" class="LineNr">114 </span><span class="muRecipe">after</span> <span class="Constant"><global-touch></span> [ +<span id="L114" class="LineNr">114 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L80'><global-touch></a></span> [ <span id="L115" class="LineNr">115 </span> <span class="Comment"># check if it's inside the output of any sandbox</span> <span id="L116" class="LineNr">116 </span> <span class="Delimiter">{</span> <span id="L117" class="LineNr">117 </span> sandbox-left-margin:num <span class="Special"><-</span> get *current-sandbox, <span class="Constant">left:offset</span> @@ -244,7 +244,7 @@ if ('onhashchange' in window) { <span id="L183" class="LineNr">183 </span>] <span id="L184" class="LineNr">184 </span> <span id="L185" class="LineNr">185 </span><span class="Comment"># when rendering a sandbox, color it in red/green if expected response exists</span> -<span id="L186" class="LineNr">186 </span><span class="muRecipe">after</span> <span class="Constant"><render-sandbox-response></span> [ +<span id="L186" class="LineNr">186 </span><span class="muRecipe">after</span> <span class="Constant"><a href='005-sandbox.mu.html#L292'><render-sandbox-response></a></span> [ <span id="L187" class="LineNr">187 </span> <span class="Delimiter">{</span> <span id="L188" class="LineNr">188 </span> <span class="muControl">break-unless</span> sandbox-response <span id="L189" class="LineNr">189 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span>, row @@ -263,7 +263,7 @@ if ('onhashchange' in window) { <span id="L202" class="LineNr">202 </span> <span class="Delimiter">}</span> <span id="L203" class="LineNr">203 </span>] <span id="L204" class="LineNr">204 </span> -<span id="L205" class="LineNr">205 </span><span class="muRecipe">before</span> <span class="Constant"><end-render-sandbox-reset-hidden></span> [ +<span id="L205" class="LineNr">205 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L306'><end-render-sandbox-reset-hidden></a></span> [ <span id="L206" class="LineNr">206 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span>,<span class="Constant"> 0</span> <span id="L207" class="LineNr">207 </span>] </pre> diff --git a/html/edit/010-sandbox-trace.mu.html b/html/edit/010-sandbox-trace.mu.html index 39f7c7b8..1d33d9a5 100644 --- a/html/edit/010-sandbox-trace.mu.html +++ b/html/edit/010-sandbox-trace.mu.html @@ -241,7 +241,7 @@ if ('onhashchange' in window) { <span id="L180" class="LineNr">180 </span>] <span id="L181" class="LineNr">181 </span> <span id="L182" class="LineNr">182 </span><span class="Comment"># clicks on sandbox code toggle its display-trace? flag</span> -<span id="L183" class="LineNr">183 </span><span class="muRecipe">after</span> <span class="Constant"><global-touch></span> [ +<span id="L183" class="LineNr">183 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L80'><global-touch></a></span> [ <span id="L184" class="LineNr">184 </span> <span class="Comment"># check if it's inside the code of any sandbox</span> <span id="L185" class="LineNr">185 </span> <span class="Delimiter">{</span> <span id="L186" class="LineNr">186 </span> sandbox-left-margin:num <span class="Special"><-</span> get *current-sandbox, <span class="Constant">left:offset</span> @@ -302,7 +302,7 @@ if ('onhashchange' in window) { <span id="L241" class="LineNr">241 </span>] <span id="L242" class="LineNr">242 </span> <span id="L243" class="LineNr">243 </span><span class="Comment"># when rendering a sandbox, dump its trace before response/warning if display-trace? property is set</span> -<span id="L244" class="LineNr">244 </span><span class="muRecipe">after</span> <span class="Constant"><render-sandbox-results></span> [ +<span id="L244" class="LineNr">244 </span><span class="muRecipe">after</span> <span class="Constant"><a href='005-sandbox.mu.html#L283'><render-sandbox-results></a></span> [ <span id="L245" class="LineNr">245 </span> <span class="Delimiter">{</span> <span id="L246" class="LineNr">246 </span> display-trace?:bool <span class="Special"><-</span> get *sandbox, <span class="Constant">display-trace?:offset</span> <span id="L247" class="LineNr">247 </span> <span class="muControl">break-unless</span> display-trace? @@ -310,7 +310,7 @@ if ('onhashchange' in window) { <span id="L249" class="LineNr">249 </span> <span class="muControl">break-unless</span> sandbox-trace <span class="Comment"># nothing to print; move on</span> <span id="L250" class="LineNr">250 </span> row, <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L356'>render-text</a> <a href='../081print.mu.html#L4'>screen</a>, sandbox-trace, left, right, <span class="Constant">245/grey</span>, row <span id="L251" class="LineNr">251 </span> <span class="Delimiter">}</span> -<span id="L252" class="LineNr">252 </span><span class="Constant"> <render-sandbox-trace-done></span> +<span id="L252" class="LineNr">252 </span><span class="Constant"> <a href='010-sandbox-trace.mu.html#L252'><render-sandbox-trace-done></a></span> <span id="L253" class="LineNr">253 </span>] </pre> </body> diff --git a/html/edit/011-errors.mu.html b/html/edit/011-errors.mu.html index cd2cf200..ee653626 100644 --- a/html/edit/011-errors.mu.html +++ b/html/edit/011-errors.mu.html @@ -84,7 +84,7 @@ if ('onhashchange' in window) { <span id="L23" class="LineNr"> 23 </span> errors-found? <span class="Special"><-</span> copy <span class="Constant">0/false</span> <span id="L24" class="LineNr"> 24 </span>] <span id="L25" class="LineNr"> 25 </span> -<span id="L26" class="LineNr"> 26 </span><span class="muRecipe">before</span> <span class="Constant"><render-components-end></span> [ +<span id="L26" class="LineNr"> 26 </span><span class="muRecipe">before</span> <span class="Constant"><a href='004-programming-environment.mu.html#L467'><render-components-end></a></span> [ <span id="L27" class="LineNr"> 27 </span> trace<span class="Constant"> 11</span>, <span class="Constant">[app]</span>, <span class="Constant">[render status]</span> <span id="L28" class="LineNr"> 28 </span> recipe-errors:text <span class="Special"><-</span> get *env, <span class="Constant">recipe-errors:offset</span> <span id="L29" class="LineNr"> 29 </span> <span class="Delimiter">{</span> @@ -93,7 +93,7 @@ if ('onhashchange' in window) { <span id="L32" class="LineNr"> 32 </span> <span class="Delimiter">}</span> <span id="L33" class="LineNr"> 33 </span>] <span id="L34" class="LineNr"> 34 </span> -<span id="L35" class="LineNr"> 35 </span><span class="muRecipe">before</span> <span class="Constant"><render-recipe-components-end></span> [ +<span id="L35" class="LineNr"> 35 </span><span class="muRecipe">before</span> <span class="Constant"><a href='004-programming-environment.mu.html#L488'><render-recipe-components-end></a></span> [ <span id="L36" class="LineNr"> 36 </span> <span class="Delimiter">{</span> <span id="L37" class="LineNr"> 37 </span> recipe-errors:text <span class="Special"><-</span> get *env, <span class="Constant">recipe-errors:offset</span> <span id="L38" class="LineNr"> 38 </span> <span class="muControl">break-unless</span> recipe-errors @@ -105,15 +105,15 @@ if ('onhashchange' in window) { <span id="L44" class="LineNr"> 44 </span> error-index:num <span class="Comment"># index of first sandbox with an error (or -1 if none)</span> <span id="L45" class="LineNr"> 45 </span>] <span id="L46" class="LineNr"> 46 </span> -<span id="L47" class="LineNr"> 47 </span><span class="muRecipe">after</span> <span class="Constant"><programming-environment-initialization></span> [ +<span id="L47" class="LineNr"> 47 </span><span class="muRecipe">after</span> <span class="Constant"><a href='004-programming-environment.mu.html#L36'><programming-environment-initialization></a></span> [ <span id="L48" class="LineNr"> 48 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">error-index:offset</span>,<span class="Constant"> -1</span> <span id="L49" class="LineNr"> 49 </span>] <span id="L50" class="LineNr"> 50 </span> -<span id="L51" class="LineNr"> 51 </span><span class="muRecipe">after</span> <span class="Constant"><run-sandboxes-begin></span> [ +<span id="L51" class="LineNr"> 51 </span><span class="muRecipe">after</span> <span class="Constant"><a href='005-sandbox.mu.html#L149'><run-sandboxes-begin></a></span> [ <span id="L52" class="LineNr"> 52 </span> *env <span class="Special"><-</span> put *env, <span class="Constant">error-index:offset</span>,<span class="Constant"> -1</span> <span id="L53" class="LineNr"> 53 </span>] <span id="L54" class="LineNr"> 54 </span> -<span id="L55" class="LineNr"> 55 </span><span class="muRecipe">before</span> <span class="Constant"><run-sandboxes-end></span> [ +<span id="L55" class="LineNr"> 55 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L183'><run-sandboxes-end></a></span> [ <span id="L56" class="LineNr"> 56 </span> <span class="Delimiter">{</span> <span id="L57" class="LineNr"> 57 </span> error-index:num <span class="Special"><-</span> get *env, <span class="Constant">error-index:offset</span> <span id="L58" class="LineNr"> 58 </span> sandboxes-completed-successfully?:bool <span class="Special"><-</span> equal error-index,<span class="Constant"> -1</span> @@ -122,7 +122,7 @@ if ('onhashchange' in window) { <span id="L61" class="LineNr"> 61 </span> <span class="Delimiter">}</span> <span id="L62" class="LineNr"> 62 </span>] <span id="L63" class="LineNr"> 63 </span> -<span id="L64" class="LineNr"> 64 </span><span class="muRecipe">before</span> <span class="Constant"><render-components-end></span> [ +<span id="L64" class="LineNr"> 64 </span><span class="muRecipe">before</span> <span class="Constant"><a href='004-programming-environment.mu.html#L467'><render-components-end></a></span> [ <span id="L65" class="LineNr"> 65 </span> <span class="Delimiter">{</span> <span id="L66" class="LineNr"> 66 </span> <span class="muControl">break-if</span> recipe-errors <span id="L67" class="LineNr"> 67 </span> error-index:num <span class="Special"><-</span> get *env, <span class="Constant">error-index:offset</span> @@ -164,7 +164,7 @@ if ('onhashchange' in window) { <span id="L103" class="LineNr">103 </span>] <span id="L104" class="LineNr">104 </span> <span id="L105" class="LineNr">105 </span><span class="Comment"># make sure we render any trace</span> -<span id="L106" class="LineNr">106 </span><span class="muRecipe">after</span> <span class="Constant"><render-sandbox-trace-done></span> [ +<span id="L106" class="LineNr">106 </span><span class="muRecipe">after</span> <span class="Constant"><a href='010-sandbox-trace.mu.html#L252'><render-sandbox-trace-done></a></span> [ <span id="L107" class="LineNr">107 </span> <span class="Delimiter">{</span> <span id="L108" class="LineNr">108 </span> sandbox-errors:text <span class="Special"><-</span> get *sandbox, <span class="Constant">errors:offset</span> <span id="L109" class="LineNr">109 </span> <span class="muControl">break-unless</span> sandbox-errors diff --git a/html/edit/012-editor-undo.mu.html b/html/edit/012-editor-undo.mu.html index 452c9809..aa6ef95e 100644 --- a/html/edit/012-editor-undo.mu.html +++ b/html/edit/012-editor-undo.mu.html @@ -122,7 +122,7 @@ if ('onhashchange' in window) { <span id="L61" class="LineNr"> 61 </span>] <span id="L62" class="LineNr"> 62 </span> <span id="L63" class="LineNr"> 63 </span><span class="Comment"># ctrl-z - undo operation</span> -<span id="L64" class="LineNr"> 64 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L64" class="LineNr"> 64 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L65" class="LineNr"> 65 </span> <span class="Delimiter">{</span> <span id="L66" class="LineNr"> 66 </span> undo?:bool <span class="Special"><-</span> equal c, <span class="Constant">26/ctrl-z</span> <span id="L67" class="LineNr"> 67 </span> <span class="muControl">break-unless</span> undo? @@ -134,13 +134,13 @@ if ('onhashchange' in window) { <span id="L73" class="LineNr"> 73 </span> redo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">redo:offset</span> <span id="L74" class="LineNr"> 74 </span> redo <span class="Special"><-</span> push op, redo <span id="L75" class="LineNr"> 75 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">redo:offset</span>, redo -<span id="L76" class="LineNr"> 76 </span><span class="Constant"> <handle-undo></span> +<span id="L76" class="LineNr"> 76 </span><span class="Constant"> <a href='012-editor-undo.mu.html#L76'><handle-undo></a></span> <span id="L77" class="LineNr"> 77 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L78" class="LineNr"> 78 </span> <span class="Delimiter">}</span> <span id="L79" class="LineNr"> 79 </span>] <span id="L80" class="LineNr"> 80 </span> <span id="L81" class="LineNr"> 81 </span><span class="Comment"># ctrl-y - redo operation</span> -<span id="L82" class="LineNr"> 82 </span><span class="muRecipe">after</span> <span class="Constant"><handle-special-character></span> [ +<span id="L82" class="LineNr"> 82 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L183'><handle-special-character></a></span> [ <span id="L83" class="LineNr"> 83 </span> <span class="Delimiter">{</span> <span id="L84" class="LineNr"> 84 </span> redo?:bool <span class="Special"><-</span> equal c, <span class="Constant">25/ctrl-y</span> <span id="L85" class="LineNr"> 85 </span> <span class="muControl">break-unless</span> redo? @@ -152,7 +152,7 @@ if ('onhashchange' in window) { <span id="L91" class="LineNr"> 91 </span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L92" class="LineNr"> 92 </span> undo <span class="Special"><-</span> push op, undo <span id="L93" class="LineNr"> 93 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">undo:offset</span>, undo -<span id="L94" class="LineNr"> 94 </span><span class="Constant"> <handle-redo></span> +<span id="L94" class="LineNr"> 94 </span><span class="Constant"> <a href='012-editor-undo.mu.html#L94'><handle-redo></a></span> <span id="L95" class="LineNr"> 95 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L96" class="LineNr"> 96 </span> <span class="Delimiter">}</span> <span id="L97" class="LineNr"> 97 </span>] @@ -235,13 +235,13 @@ if ('onhashchange' in window) { <span id="L174" class="LineNr"> 174 </span>] <span id="L175" class="LineNr"> 175 </span> <span id="L176" class="LineNr"> 176 </span><span class="Comment"># enter operations never coalesce with typing before or after</span> -<span id="L177" class="LineNr"> 177 </span><span class="muRecipe">after</span> <span class="Constant"><insert-enter-begin></span> [ +<span id="L177" class="LineNr"> 177 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L857'><insert-enter-begin></a></span> [ <span id="L178" class="LineNr"> 178 </span> cursor-row-before:num <span class="Special"><-</span> copy cursor-row <span id="L179" class="LineNr"> 179 </span> cursor-column-before:num <span class="Special"><-</span> copy cursor-column <span id="L180" class="LineNr"> 180 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L181" class="LineNr"> 181 </span> cursor-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L182" class="LineNr"> 182 </span>] -<span id="L183" class="LineNr"> 183 </span><span class="muRecipe">before</span> <span class="Constant"><insert-enter-end></span> [ +<span id="L183" class="LineNr"> 183 </span><span class="muRecipe">before</span> <span class="Constant"><a href='002-typing.mu.html#L859'><insert-enter-end></a></span> [ <span id="L184" class="LineNr"> 184 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L185" class="LineNr"> 185 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L186" class="LineNr"> 186 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> @@ -269,7 +269,7 @@ if ('onhashchange' in window) { <span id="L208" class="LineNr"> 208 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">redo:offset</span>, redo <span id="L209" class="LineNr"> 209 </span>] <span id="L210" class="LineNr"> 210 </span> -<span id="L211" class="LineNr"> 211 </span><span class="muRecipe">after</span> <span class="Constant"><handle-undo></span> [ +<span id="L211" class="LineNr"> 211 </span><span class="muRecipe">after</span> <span class="Constant"><a href='012-editor-undo.mu.html#L76'><handle-undo></a></span> [ <span id="L212" class="LineNr"> 212 </span> <span class="Delimiter">{</span> <span id="L213" class="LineNr"> 213 </span> typing:<a href='012-editor-undo.mu.html#L11'>insert-operation</a>, is-insert?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">typing:variant</span> <span id="L214" class="LineNr"> 214 </span> <span class="muControl">break-unless</span> is-insert? @@ -469,7 +469,7 @@ if ('onhashchange' in window) { <span id="L408" class="LineNr"> 408 </span> ] <span id="L409" class="LineNr"> 409 </span>] <span id="L410" class="LineNr"> 410 </span> -<span id="L411" class="LineNr"> 411 </span><span class="muRecipe">after</span> <span class="Constant"><handle-redo></span> [ +<span id="L411" class="LineNr"> 411 </span><span class="muRecipe">after</span> <span class="Constant"><a href='012-editor-undo.mu.html#L94'><handle-redo></a></span> [ <span id="L412" class="LineNr"> 412 </span> <span class="Delimiter">{</span> <span id="L413" class="LineNr"> 413 </span> typing:<a href='012-editor-undo.mu.html#L11'>insert-operation</a>, is-insert?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">typing:variant</span> <span id="L414" class="LineNr"> 414 </span> <span class="muControl">break-unless</span> is-insert? @@ -810,7 +810,7 @@ if ('onhashchange' in window) { <span id="L749" class="LineNr"> 749 </span><span class="Constant"> +done-adding-move-operation</span> <span id="L750" class="LineNr"> 750 </span>] <span id="L751" class="LineNr"> 751 </span> -<span id="L752" class="LineNr"> 752 </span><span class="muRecipe">after</span> <span class="Constant"><handle-undo></span> [ +<span id="L752" class="LineNr"> 752 </span><span class="muRecipe">after</span> <span class="Constant"><a href='012-editor-undo.mu.html#L76'><handle-undo></a></span> [ <span id="L753" class="LineNr"> 753 </span> <span class="Delimiter">{</span> <span id="L754" class="LineNr"> 754 </span> move:<a href='012-editor-undo.mu.html#L26'>move-operation</a>, is-move?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">move:variant</span> <span id="L755" class="LineNr"> 755 </span> <span class="muControl">break-unless</span> is-move? @@ -1446,7 +1446,7 @@ if ('onhashchange' in window) { <span id="L1385" class="LineNr">1385 </span> ] <span id="L1386" class="LineNr">1386 </span>] <span id="L1387" class="LineNr">1387 </span> -<span id="L1388" class="LineNr">1388 </span><span class="muRecipe">after</span> <span class="Constant"><handle-redo></span> [ +<span id="L1388" class="LineNr">1388 </span><span class="muRecipe">after</span> <span class="Constant"><a href='012-editor-undo.mu.html#L94'><handle-redo></a></span> [ <span id="L1389" class="LineNr">1389 </span> <span class="Delimiter">{</span> <span id="L1390" class="LineNr">1390 </span> move:<a href='012-editor-undo.mu.html#L26'>move-operation</a>, is-move?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">move:variant</span> <span id="L1391" class="LineNr">1391 </span> <span class="muControl">break-unless</span> is-move? @@ -1675,10 +1675,10 @@ if ('onhashchange' in window) { <span id="L1614" class="LineNr">1614 </span>] <span id="L1615" class="LineNr">1615 </span> <span id="L1616" class="LineNr">1616 </span><span class="Comment"># save operation to undo</span> -<span id="L1617" class="LineNr">1617 </span><span class="muRecipe">after</span> <span class="Constant"><backspace-character-begin></span> [ +<span id="L1617" class="LineNr">1617 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L73'><backspace-character-begin></a></span> [ <span id="L1618" class="LineNr">1618 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1619" class="LineNr">1619 </span>] -<span id="L1620" class="LineNr">1620 </span><span class="muRecipe">before</span> <span class="Constant"><backspace-character-end></span> [ +<span id="L1620" class="LineNr">1620 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L75'><backspace-character-end></a></span> [ <span id="L1621" class="LineNr">1621 </span> <span class="Delimiter">{</span> <span id="L1622" class="LineNr">1622 </span> <span class="muControl">break-unless</span> backspaced-cell <span class="Comment"># backspace failed; don't add an undo operation</span> <span id="L1623" class="LineNr">1623 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> @@ -1714,7 +1714,7 @@ if ('onhashchange' in window) { <span id="L1653" class="LineNr">1653 </span> <span class="Delimiter">}</span> <span id="L1654" class="LineNr">1654 </span>] <span id="L1655" class="LineNr">1655 </span> -<span id="L1656" class="LineNr">1656 </span><span class="muRecipe">after</span> <span class="Constant"><handle-undo></span> [ +<span id="L1656" class="LineNr">1656 </span><span class="muRecipe">after</span> <span class="Constant"><a href='012-editor-undo.mu.html#L76'><handle-undo></a></span> [ <span id="L1657" class="LineNr">1657 </span> <span class="Delimiter">{</span> <span id="L1658" class="LineNr">1658 </span> deletion:<a href='012-editor-undo.mu.html#L41'>delete-operation</a>, is-delete?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">delete:variant</span> <span id="L1659" class="LineNr">1659 </span> <span class="muControl">break-unless</span> is-delete? @@ -1734,7 +1734,7 @@ if ('onhashchange' in window) { <span id="L1673" class="LineNr">1673 </span> <span class="Delimiter">}</span> <span id="L1674" class="LineNr">1674 </span>] <span id="L1675" class="LineNr">1675 </span> -<span id="L1676" class="LineNr">1676 </span><span class="muRecipe">after</span> <span class="Constant"><handle-redo></span> [ +<span id="L1676" class="LineNr">1676 </span><span class="muRecipe">after</span> <span class="Constant"><a href='012-editor-undo.mu.html#L94'><handle-redo></a></span> [ <span id="L1677" class="LineNr">1677 </span> <span class="Delimiter">{</span> <span id="L1678" class="LineNr">1678 </span> deletion:<a href='012-editor-undo.mu.html#L41'>delete-operation</a>, is-delete?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">delete:variant</span> <span id="L1679" class="LineNr">1679 </span> <span class="muControl">break-unless</span> is-delete? @@ -1901,10 +1901,10 @@ if ('onhashchange' in window) { <span id="L1840" class="LineNr">1840 </span> ] <span id="L1841" class="LineNr">1841 </span>] <span id="L1842" class="LineNr">1842 </span> -<span id="L1843" class="LineNr">1843 </span><span class="muRecipe">after</span> <span class="Constant"><delete-character-begin></span> [ +<span id="L1843" class="LineNr">1843 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L341'><delete-character-begin></a></span> [ <span id="L1844" class="LineNr">1844 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1845" class="LineNr">1845 </span>] -<span id="L1846" class="LineNr">1846 </span><span class="muRecipe">before</span> <span class="Constant"><delete-character-end></span> [ +<span id="L1846" class="LineNr">1846 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L343'><delete-character-end></a></span> [ <span id="L1847" class="LineNr">1847 </span> <span class="Delimiter">{</span> <span id="L1848" class="LineNr">1848 </span> <span class="muControl">break-unless</span> deleted-cell <span class="Comment"># delete failed; don't add an undo operation</span> <span id="L1849" class="LineNr">1849 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> @@ -2027,10 +2027,10 @@ if ('onhashchange' in window) { <span id="L1966" class="LineNr">1966 </span> ] <span id="L1967" class="LineNr">1967 </span>] <span id="L1968" class="LineNr">1968 </span> -<span id="L1969" class="LineNr">1969 </span><span class="muRecipe">after</span> <span class="Constant"><delete-to-end-of-line-begin></span> [ +<span id="L1969" class="LineNr">1969 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1789'><delete-to-end-of-line-begin></a></span> [ <span id="L1970" class="LineNr">1970 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1971" class="LineNr">1971 </span>] -<span id="L1972" class="LineNr">1972 </span><span class="muRecipe">before</span> <span class="Constant"><delete-to-end-of-line-end></span> [ +<span id="L1972" class="LineNr">1972 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1791'><delete-to-end-of-line-end></a></span> [ <span id="L1973" class="LineNr">1973 </span> <span class="Delimiter">{</span> <span id="L1974" class="LineNr">1974 </span> <span class="muControl">break-unless</span> deleted-cells <span class="Comment"># delete failed; don't add an undo operation</span> <span id="L1975" class="LineNr">1975 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> @@ -2130,10 +2130,10 @@ if ('onhashchange' in window) { <span id="L2069" class="LineNr">2069 </span> ] <span id="L2070" class="LineNr">2070 </span>] <span id="L2071" class="LineNr">2071 </span> -<span id="L2072" class="LineNr">2072 </span><span class="muRecipe">after</span> <span class="Constant"><delete-to-start-of-line-begin></span> [ +<span id="L2072" class="LineNr">2072 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1652'><delete-to-start-of-line-begin></a></span> [ <span id="L2073" class="LineNr">2073 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2074" class="LineNr">2074 </span>] -<span id="L2075" class="LineNr">2075 </span><span class="muRecipe">before</span> <span class="Constant"><delete-to-start-of-line-end></span> [ +<span id="L2075" class="LineNr">2075 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1654'><delete-to-start-of-line-end></a></span> [ <span id="L2076" class="LineNr">2076 </span> <span class="Delimiter">{</span> <span id="L2077" class="LineNr">2077 </span> <span class="muControl">break-unless</span> deleted-cells <span class="Comment"># delete failed; don't add an undo operation</span> <span id="L2078" class="LineNr">2078 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> diff --git a/linkify/003linkify.cc b/linkify/003linkify.cc index 40eec81d..8f97a1d7 100644 --- a/linkify/003linkify.cc +++ b/linkify/003linkify.cc @@ -18,7 +18,6 @@ // single definition but there's still multiple overloads (say I defined // 'clear()' on some type, and it's already defined on STL classes) // - ctags misses some symbols in layered code -// - Mu's before/after blocks should point to the location of their labels struct syminfo { string filename; @@ -40,12 +39,28 @@ bool starts_with(const string& s, const string& pat) { return b == pat.end(); } +void encode_some_html_entities(string& s) { + std::string::size_type pos = 0; + while (true) { + pos = s.find_first_of("<>", pos); + if (pos == std::string::npos) break; + std::string replacement; + switch (s.at(pos)) { + case '<': replacement = "<"; break; + case '>': replacement = ">"; break; + } + s.replace(pos, 1, replacement); + pos += replacement.size(); + }; +} + void read_tags(const string& filename, map<string, syminfo>& info) { ifstream in(filename); //& cerr << "reading " << filename << '\n'; string dummy; while (has_data(in)) { string symbol; in >> symbol; + encode_some_html_entities(symbol); //& cerr << symbol << '\n'; if (info.find(symbol) != info.end()) { info[symbol].line_num = -1; |