[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:08 PDT 2024


================
@@ -0,0 +1,177 @@
+//===- ScriptLexer.h --------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the nums for LinkerScript lexer
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_ELF_SCRIPT_TOKENIZER_H
+#define LLD_ELF_SCRIPT_TOKENIZER_H
+
+namespace lld {
+namespace elf {
+enum class Kind {
----------------
yugier wrote:

Yes agree. Updated `Kind` to `Tok`!

https://github.com/llvm/llvm-project/pull/100180


More information about the llvm-commits mailing list