From 6812aa00ca293b26babdc0e03b36b651576920a7 Mon Sep 17 00:00:00 2001 From: Bastiaan van der Plaat Date: Wed, 30 Apr 2025 21:08:14 +0200 Subject: [PATCH] AK: Add SourceGenerator mapping clone method This is useful when you want to build an independent string using the same names and replacements as an existing generator. --- AK/SourceGenerator.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AK/SourceGenerator.h b/AK/SourceGenerator.h index 005e5e739c4..285e6e70d5a 100644 --- a/AK/SourceGenerator.h +++ b/AK/SourceGenerator.h @@ -66,6 +66,8 @@ public: return result.release_value(); } + [[nodiscard]] MappingType clone_mapping() const { return MUST(m_mapping.clone()); } + StringView as_string_view() const { return m_builder.string_view(); } void append(StringView pattern)