From c2d537c46b234f03d683f967aafbca20914a72e1 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 20 Oct 2020 01:03:39 -0700 Subject: 7080 Constructing new functions with ctrl-d is now working right. But the call seems exactly flipped. --- apps/tile/gap-buffer.mu | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apps/tile/gap-buffer.mu') 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 +} -- cgit 1.4.1-2-gfad0