From f57121fadb5fec478ab5c1c7d1a9cf2129d92980 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2026 08:18:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Remove=20unused=20parser=20code?= =?UTF-8?q?=20allowance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the `#[allow(dead_code)]` attribute from the `Parser` implementation in `compiler/parser/src/parser.rs`. It also removes the actual unused dead code (`current_span` and `prev_span` methods) and the subsequent unused `Span` import. Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com> --- compiler/parser/src/parser.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/compiler/parser/src/parser.rs b/compiler/parser/src/parser.rs index 496b3056..b45d396c 100644 --- a/compiler/parser/src/parser.rs +++ b/compiler/parser/src/parser.rs @@ -1,5 +1,5 @@ use std::collections::HashSet; -use techscript_common::{NodeIdGenerator, Span}; +use techscript_common::NodeIdGenerator; use techscript_errors::{Diagnostic, DiagnosticLevel, DiagnosticReporter, ErrorCode}; use techscript_syntax::{Token, TokenKind}; @@ -18,7 +18,6 @@ pub struct Parser<'a> { pub(crate) dsl_sub_blocks: HashSet, } -#[allow(dead_code)] impl<'a> Parser<'a> { /// Create a new Parser instance with DSL keyword registry initialized. pub fn new(tokens: &'a [Token]) -> Self { @@ -212,16 +211,6 @@ impl<'a> Parser<'a> { self.node_id_gen.next() } - /// Returns the span of the current token. - pub(crate) fn current_span(&self) -> Span { - self.peek().span - } - - /// Returns the span of the previous token. - pub(crate) fn prev_span(&self) -> Span { - self.previous().span - } - /// Synchronizes the parser boundary to recover from syntax errors. pub(crate) fn synchronize(&mut self) { self.advance();