[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 8 12:09:14 PDT 2024
================
@@ -39,20 +41,27 @@ class Token {
Comment,
};
- Token(std::string Str);
+ Token(StringRef Str);
- Token(std::string Str, char Identifier);
+ Token(StringRef RawBody, StringRef Str, char Identifier);
- std::string getTokenBody() const { return TokenBody; };
+ StringRef getTokenBody() const { return TokenBody; };
+
+ StringRef getRawBody() const { return RawBody; };
+
+ void setTokenBody(SmallString<128> NewBody) { TokenBody = NewBody; };
----------------
ilovepi wrote:
So why does the input parameter need to be a SmalString? A StringRef or a Twine should be sufficient.
https://github.com/llvm/llvm-project/pull/105893
More information about the cfe-commits
mailing list