From 429672fde79663d2cdfd5a514ff2c7d389c2487c Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Tue, 1 Oct 2024 17:31:15 +0200 Subject: [PATCH] Add verbose/debug block variants. --- src/ui.toit | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ui.toit b/src/ui.toit index 7594e38..1c620f1 100644 --- a/src/ui.toit +++ b/src/ui.toit @@ -228,11 +228,20 @@ class Ui: emit --debug/bool object/any: emit --kind=DEBUG --structured=: object + /** Variant of $(emit --debug object) that only calls the given $generator when needed. */ + emit --debug/bool [generator] -> none: + emit --kind=DEBUG --structured=generator + /** Variant of $emit using the $VERBOSE kind. */ // TODO(florian): change the bool type to 'True'. emit --verbose/bool object/any: emit --kind=VERBOSE --structured=: object + /** Variant of $(emit --verbose object) that only calls the given $generator when needed. */ + // TODO(florian): change the bool type to 'True'. + emit --verbose/bool [generator]: + emit --kind=VERBOSE --structured=generator + /** Variant of $emit using the $WARNING kind. */ // TODO(florian): change the bool type to 'True'. emit --warning/bool object/any: