From 7bd0eeaee42a6cd4ab208e7cdab8c063676cb2f0 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 2 Nov 2026 04:08:42 +0000 Subject: [PATCH] refactor(lexer): replace `const` with `static` (#28695) Refactor. Use `static` instead of `const` to store large tables. --- crates/oxc_lexer/src/pipeline/operators.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_lexer/src/pipeline/operators.rs b/crates/oxc_lexer/src/pipeline/operators.rs index bbd9c36549..2ca965898e 100644 --- a/crates/oxc_lexer/src/pipeline/operators.rs +++ b/crates/oxc_lexer/src/pipeline/operators.rs @@ -154,8 +154,8 @@ struct OpTablesData { op3: OpTableData, } -const OP2_TABLE: OpTable = OpTable::new(&OP_TABLES_DATA.op2, 2, OP2_MUL); -const OP3_TABLE: OpTable = OpTable::new(&OP_TABLES_DATA.op3, 3, OP3_MUL); +static OP2_TABLE: OpTable = OpTable::new(&OP_TABLES_DATA.op2, 2, OP2_MUL); +static OP3_TABLE: OpTable = OpTable::new(&OP_TABLES_DATA.op3, 3, OP3_MUL); /// Operator hash table. struct OpTable {