diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-11 01:31:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-11 01:31:31 -0400 |
| commit | 7126755275f12e6278031e78ff33f65801b133dd (patch) | |
| tree | 7f43f3449eb7bb69b0879dd41eb174e89fdc34cc /builtins/pointer.c | |
| parent | 89234e34e292861fccb8e5bdbefc695a7e443eea (diff) | |
Add optional types
Diffstat (limited to 'builtins/pointer.c')
| -rw-r--r-- | builtins/pointer.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/builtins/pointer.c b/builtins/pointer.c index 0d89e8a6..9067ebd7 100644 --- a/builtins/pointer.c +++ b/builtins/pointer.c @@ -27,10 +27,6 @@ public Text_t Pointer$as_text(const void *x, bool colorize, const TypeInfo *type text = Text$concat(Text("\x1b[34;1m"), Text$from_str(ptr_info.sigil), typename, Text("\x1b[m")); else text = Text$concat(Text$from_str(ptr_info.sigil), typename); - - if (ptr_info.is_optional) - text = Text$concat(text, Text("?")); - return text; } const void *ptr = *(const void**)x; @@ -55,8 +51,6 @@ public Text_t Pointer$as_text(const void *x, bool colorize, const TypeInfo *type Text(".."), Int32$as_text(&depth, false, &Int32$info), colorize ? Text("\x1b[m") : Text("")); - if (ptr_info.is_optional) - text = Text$concat(text, colorize ? Text("\x1b[34;1m?\x1b[m") : Text("?")); return text; } } @@ -73,9 +67,6 @@ public Text_t Pointer$as_text(const void *x, bool colorize, const TypeInfo *type text = Text$concat(Text("\x1b[34;1m"), Text$from_str(ptr_info.sigil), Text("\x1b[m"), pointed); else text = Text$concat(Text$from_str(ptr_info.sigil), pointed); - - if (ptr_info.is_optional) - text = Text$concat(text, Text("?")); return text; } |
