From 639d5ddfca562e5b3645955551be244b5e8ca9c6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 1 Sep 2025 12:51:19 -0400 Subject: Make text indexing optional --- examples/colorful/colorful.tm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/colorful/colorful.tm b/examples/colorful/colorful.tm index fed873fd..bef77dd3 100644 --- a/examples/colorful/colorful.tm +++ b/examples/colorful/colorful.tm @@ -53,7 +53,7 @@ enum _Color(Default, Bright(color:Int16), Color8Bit(color:Int16), Color24Bit(col hex := text.from(2) return none unless hex.length == 3 or hex.length == 6 if hex.length == 3 - hex = hex[1]++hex[1]++hex[2]++hex[2]++hex[3]++hex[3] + hex = hex[1]!++hex[1]!++hex[2]!++hex[2]!++hex[3]!++hex[3]! n := Int32.parse("0x" ++ hex) or return none return Color24Bit(n) else if text.matches_pattern($Pat/{1-3 digit}/) -- cgit v1.2.3