diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-10-20 01:03:39 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-10-20 01:07:21 -0700 |
commit | c2d537c46b234f03d683f967aafbca20914a72e1 (patch) | |
tree | 4c31db55a98a4187605f13284dcfd6550ec4dfe3 /apps/tile/gap-buffer.mu | |
parent | 0cdbfff25664d2bd3257220ca1509e7bfbd84c75 (diff) | |
download | mu-c2d537c46b234f03d683f967aafbca20914a72e1.tar.gz |
7080
Constructing new functions with ctrl-d is now working right. But the call seems exactly flipped.
Diffstat (limited to 'apps/tile/gap-buffer.mu')
-rw-r--r-- | apps/tile/gap-buffer.mu | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/tile/gap-buffer.mu b/apps/tile/gap-buffer.mu index a6d6a85e..e694da08 100644 --- a/apps/tile/gap-buffer.mu +++ b/apps/tile/gap-buffer.mu @@ -306,3 +306,13 @@ fn copy-gap-buffer _src-ah: (addr handle gap-buffer), _dest-ah: (addr handle gap dest <- get dest-a, right copy-grapheme-stack src, dest } + +fn gap-buffer-is-decimal-integer? _self: (addr gap-buffer) -> result/eax: boolean { + var self/esi: (addr gap-buffer) <- copy _self + var curr/ecx: (addr grapheme-stack) <- get self, left + result <- grapheme-stack-is-decimal-integer? curr + compare result, 0 # false + break-if-= + curr <- get self, right + result <- grapheme-stack-is-decimal-integer? curr +} |