From 3ff2fe607c2cb5690d201d3b83ddcc957e949b7a Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 9 Nov 2021 09:23:31 -0800 Subject: . --- html/shell/infix.mu.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'html/shell/infix.mu.html') diff --git a/html/shell/infix.mu.html b/html/shell/infix.mu.html index a38807a2..dc605e57 100644 --- a/html/shell/infix.mu.html +++ b/html/shell/infix.mu.html @@ -323,8 +323,8 @@ if ('onhashchange' in window) { 312 var buffer/edi: (addr gap-buffer) <- address buffer-storage 313 initialize-gap-buffer buffer, 0x40/max-symbol-size 314 # scan for first non-$ -315 var g/eax: grapheme <- read-grapheme sym-data -316 add-grapheme-at-gap buffer, g +315 var g/eax: code-point-utf8 <- read-code-point-utf8 sym-data +316 add-code-point-utf8-at-gap buffer, g 317 { 318 compare g, 0x24/dollar 319 break-if-!= @@ -334,28 +334,28 @@ if ('onhashchange' in window) { 323 break-if-= 324 return # symbol is all '$'s; do nothing 325 } -326 g <- read-grapheme sym-data -327 add-grapheme-at-gap buffer, g +326 g <- read-code-point-utf8 sym-data +327 add-code-point-utf8-at-gap buffer, g 328 loop 329 } 330 var tokenization-needed?: boolean -331 var _operator-so-far?/eax: boolean <- operator-grapheme? g +331 var _operator-so-far?/eax: boolean <- operator-code-point-utf8? g 332 var operator-so-far?/ecx: boolean <- copy _operator-so-far? 333 { 334 var done?/eax: boolean <- stream-empty? sym-data 335 compare done?, 0/false 336 break-if-!= -337 var g/eax: grapheme <- read-grapheme sym-data +337 var g/eax: code-point-utf8 <- read-code-point-utf8 sym-data 338 { -339 var curr-operator?/eax: boolean <- operator-grapheme? g +339 var curr-operator?/eax: boolean <- operator-code-point-utf8? g 340 compare curr-operator?, operator-so-far? 341 break-if-= 342 # state change; insert a space -343 add-grapheme-at-gap buffer, 0x20/space +343 add-code-point-utf8-at-gap buffer, 0x20/space 344 operator-so-far? <- copy curr-operator? 345 copy-to tokenization-needed?, 1/true 346 } -347 add-grapheme-at-gap buffer, g +347 add-code-point-utf8-at-gap buffer, g 348 loop 349 } 350 compare tokenization-needed?, 0/false @@ -417,7 +417,7 @@ if ('onhashchange' in window) { 406 407 # helpers 408 -409 # return true if x is composed entirely of operator graphemes, optionally prefixed with some '$'s +409 # return true if x is composed entirely of operator code-point-utf8s, optionally prefixed with some '$'s 410 # some operator, some non-operator => pre-tokenized symbol; return false 411 # all '$'s => return false 412 fn operator-symbol? _x: (addr cell) -> _/eax: boolean { @@ -432,7 +432,7 @@ if ('onhashchange' in window) { 421 var _x-data/eax: (addr stream byte) <- lookup *x-data-ah 422 var x-data/esi: (addr stream byte) <- copy _x-data 423 rewind-stream x-data -424 var g/eax: grapheme <- read-grapheme x-data +424 var g/eax: code-point-utf8 <- read-code-point-utf8 x-data 425 # special case: '$' is reserved for gensyms, and can work with either 426 # operator or non-operator symbols. 427 { @@ -445,12 +445,12 @@ if ('onhashchange' in window) { 434 # '$', '$$', '$$$', etc. are regular symbols 435 return 0/false 436 } -437 g <- read-grapheme x-data +437 g <- read-code-point-utf8 x-data 438 loop 439 } 440 { 441 { -442 var result/eax: boolean <- operator-grapheme? g +442 var result/eax: boolean <- operator-code-point-utf8? g 443 compare result, 0/false 444 break-if-!= 445 return 0/false @@ -460,13 +460,13 @@ if ('onhashchange' in window) { 449 compare done?, 0/false 450 } 451 break-if-!= -452 g <- read-grapheme x-data +452 g <- read-code-point-utf8 x-data 453 loop 454 } 455 return 1/true 456 } 457 -458 fn operator-grapheme? g: grapheme -> _/eax: boolean { +458 fn operator-code-point-utf8? g: code-point-utf8 -> _/eax: boolean { 459 # '$' is special and can be in either a symbol or operator; here we treat it as a symbol 460 compare g, 0x25/percent 461 { -- cgit 1.4.1-2-gfad0