Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Quick and dirty node counting in the parser #6083

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions crates/oxc_ast/src/ast_builder_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use oxc_syntax::{number::NumberBase, operator::UnaryOperator};

#[allow(clippy::wildcard_imports)]
use crate::ast::*;
use crate::AstBuilder;
use crate::{stats::Stats, AstBuilder};

/// Type that can be used in any AST builder method call which requires an `IntoIn<'a, Anything<'a>>`.
/// Pass `NONE` instead of `None::<Anything<'a>>`.
Expand All @@ -28,8 +28,8 @@ impl<'a, T> FromIn<'a, NONE> for Option<Box<'a, T>> {

impl<'a> AstBuilder<'a> {
#[inline]
pub fn new(allocator: &'a Allocator) -> Self {
Self { allocator }
pub fn new(allocator: &'a Allocator, stats: &'a Stats) -> Self {
Self { allocator, stats }
}

#[inline]
Expand Down
Loading
Loading