aboutsummaryrefslogtreecommitdiff
path: root/builtins
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-04 00:18:03 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-04 00:18:03 -0400
commitec688c11bb92a10891cad98de7470a2773dfd167 (patch)
treeb678f35fdf6bb6424f10a639f177532611185955 /builtins
parentfbb7bee68b1323508bdbfff2da33050b4a4f95d2 (diff)
Clean up codegen so $Foo"..." comes out as foo$Foo("...") instead of
Text("...")
Diffstat (limited to 'builtins')
-rw-r--r--builtins/text.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtins/text.h b/builtins/text.h
index 3aa51872..ddc91afc 100644
--- a/builtins/text.h
+++ b/builtins/text.h
@@ -52,6 +52,8 @@ Text_t Text$join(Text_t glue, array_t pieces);
extern const TypeInfo $Text;
+#define Pattern(text) ((Pattern_t)Text(text))
+#define Patterns(...) ((Pattern_t)Texts(__VA_ARGS__))
Pattern_t Pattern$escape_text(Text_t text);
extern const TypeInfo Pattern;