diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-01-28 00:54:02 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-01-28 00:56:27 -0800 |
commit | 88b5a22b94f19145bd78988554035cea24423c06 (patch) | |
tree | 3d83e341e0201904159bd7a4f377f2d92b46dbc0 | |
parent | 88220d1dde7b8f0395ef756265f8bbfa7709053e (diff) | |
download | mu-88b5a22b94f19145bd78988554035cea24423c06.tar.gz |
652
-rw-r--r-- | color-repl.mu | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/color-repl.mu b/color-repl.mu index eede10e1..f34f2f7e 100644 --- a/color-repl.mu +++ b/color-repl.mu @@ -47,7 +47,7 @@ (comment?:boolean <- equal c:character ((#\; literal))) (break-unless comment?:boolean) ($print-key-to-host c:character 4:literal/fg/blue) - (skip-comment result:buffer-address) + (slurp-comment result:buffer-address) ; comment slurps newline, so check if we should return (end-sexp?:boolean <- lesser-or-equal open-parens:integer 0:literal) (break-if end-sexp?:boolean 2:blocks) @@ -101,7 +101,8 @@ (reply s:string-address) ]) -(function skip-comment [ +; list of characters => whether a comment was consumed (can also return by backspacing past comment leader ';') +(function slurp-comment [ (default-space:space-address <- new space:literal 30:literal) (result:buffer-address <- next-input) (orig-len:integer <- get result:buffer-address/deref length:offset) |