aboutsummaryrefslogtreecommitdiff
path: root/core/text/regex/regex.odin
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-07-24 16:05:48 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-07-24 16:27:20 -0400
commit042f6de478b67b2a19fc5acaa4999d54700f6db8 (patch)
treeee3c2683f94747c0bd25832bfbb6fe2034f7e21c /core/text/regex/regex.odin
parentc52a8a5f86707eeb71bcb44e2f691c67c9383500 (diff)
Remove printing facilities for `Regular_Expression`
The `original_pattern` introduced a tenuous dependency to the expression value as a whole, and after some consideration, I decided that it would be better for the developer to manage their own pattern strings. In the event you need to print the text representation of a pattern, it's usually better that you manage the memory of it as well.
Diffstat (limited to 'core/text/regex/regex.odin')
-rw-r--r--core/text/regex/regex.odin2
1 files changed, 0 insertions, 2 deletions
diff --git a/core/text/regex/regex.odin b/core/text/regex/regex.odin
index 1736f2305..0bb0b7824 100644
--- a/core/text/regex/regex.odin
+++ b/core/text/regex/regex.odin
@@ -30,7 +30,6 @@ Capture :: struct {
}
Regular_Expression :: struct {
- original_pattern: string,
flags: Flags,
class_data: []virtual_machine.Rune_Class_Data,
program: []virtual_machine.Opcode `fmt:"-"`,
@@ -92,7 +91,6 @@ create :: proc(
// allocator so everything can be tightly packed.
context.allocator = permanent_allocator
- result.original_pattern = pattern
result.flags = flags
if len(class_data) > 0 {