Skip to content

Commit

Permalink
chore: mark old parser as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix-ru committed Apr 4, 2024
1 parent 676293e commit bf8d2c5
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/fervid/benches/parser_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn parser_benchmark(c: &mut Criterion) {
c.bench_with_input(
BenchmarkId::new("parser: parse", input.0),
&input.1,
|b, component| b.iter(|| fervid::parser::core::parse_sfc(black_box(component))),
|b, component| b.iter(|| fervid::parser_old::core::parse_sfc(black_box(component))),
);
}
}
Expand Down
7 changes: 5 additions & 2 deletions crates/fervid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
//! "#;
//!
//! // Parse
//! let (remaining_input, sfc) = fervid::parser::core::parse_sfc(input).unwrap();
//! let mut parse_errors = vec![];
//! let mut parser = fervid_parser::SfcParser::new(input, &mut parse_errors);
//! let sfc = parser.parse_sfc().unwrap();
//!
//! // Do the necessary transformations
//! let is_prod = true;
Expand Down Expand Up @@ -43,7 +45,8 @@
extern crate lazy_static;

pub mod errors;
pub mod parser;
#[deprecated]
pub mod parser_old;

use errors::CompileError;
use fervid_codegen::CodegenContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use nom::{
};
use swc_core::common::DUMMY_SP;

use crate::parser::{
use crate::parser_old::{
ecma::{parse_js, parse_js_pat},
html_utils::html_name,
};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bf8d2c5

Please sign in to comment.