[lld] [ELF] Added `struct Token` and changed `next()` and `peek()` to return Token (PR #100180)
Hongyu Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 15:16:30 PDT 2024
================
@@ -90,6 +90,22 @@ std::string ScriptLexer::getCurrentLocation() {
return (filename + ":" + Twine(getLineNumber())).str();
}
+std::string ScriptLexer::joinTokens(size_t begin, size_t end) {
+ auto itBegin = tokens.begin() + begin;
+ auto itEnd = tokens.begin() + end;
+
+ std::string S;
+ if (itBegin == itEnd)
+ return S;
+
+ S += (*itBegin).val;
+ while (++itBegin != itEnd) {
+ S += " ";
+ S += (*itBegin).val;
----------------
yugier wrote:
Done
https://github.com/llvm/llvm-project/pull/100180
More information about the llvm-commits
mailing list