summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2022-02-22 19:21:33 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-28 23:08:08 +0200
commit6b20496758ce235ee279526c64dee1575b29e433 (patch)
tree04512f970e5078640fca13ce7ea8a99490bced96
parentf6f7280fe34fb38367305eb0f37b6d38538b8a65 (diff)
downloadserenity-6b20496758ce235ee279526c64dee1575b29e433.zip
AK: Add `appendln` helper to SourceGenerator
-rw-r--r--AK/SourceGenerator.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/AK/SourceGenerator.h b/AK/SourceGenerator.h
index 53c6367b36..00dfc3ca1f 100644
--- a/AK/SourceGenerator.h
+++ b/AK/SourceGenerator.h
@@ -77,6 +77,12 @@ public:
}
}
+ void appendln(StringView pattern)
+ {
+ append(pattern);
+ m_builder.append('\n');
+ }
+
private:
StringBuilder& m_builder;
MappingType m_mapping;