Skip to content

Commit 78cecf2

Browse files
authored
Merge pull request #76 from Tcode-Motion/remove-dead-code-allowance-parser-17790725839574516037
🧹 [Remove unused parser code allowance]
2 parents d7447b4 + f57121f commit 78cecf2

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎compiler/parser/src/parser.rs‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::collections::HashSet;
2-
use techscript_common::{NodeIdGenerator, Span};
2+
use techscript_common::NodeIdGenerator;
33
use techscript_errors::{Diagnostic, DiagnosticLevel, DiagnosticReporter, ErrorCode};
44
use techscript_syntax::{Token, TokenKind};
55

@@ -18,7 +18,6 @@ pub struct Parser<'a> {
1818
pub(crate) dsl_sub_blocks: HashSet<String>,
1919
}
2020

21-
#[allow(dead_code)]
2221
impl<'a> Parser<'a> {
2322
/// Create a new Parser instance with DSL keyword registry initialized.
2423
pub fn new(tokens: &'a [Token]) -> Self {
@@ -212,16 +211,6 @@ impl<'a> Parser<'a> {
212211
self.node_id_gen.next()
213212
}
214213

215-
/// Returns the span of the current token.
216-
pub(crate) fn current_span(&self) -> Span {
217-
self.peek().span
218-
}
219-
220-
/// Returns the span of the previous token.
221-
pub(crate) fn prev_span(&self) -> Span {
222-
self.previous().span
223-
}
224-
225214
/// Synchronizes the parser boundary to recover from syntax errors.
226215
pub(crate) fn synchronize(&mut self) {
227216
self.advance();

0 commit comments

Comments
 (0)