# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.94.0"
name = "oxc_parser"
version = "0.135.0"
authors = [
    "Boshen <boshenc@gmail.com>",
    "Oxc contributors",
]
build = false
include = [
    "/examples",
    "/src",
]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A collection of JavaScript tools written in Rust."
homepage = "https://oxc.rs"
readme = "README.md"
keywords = [
    "JavaScript",
    "TypeScript",
    "linter",
    "minifier",
    "parser",
]
categories = [
    "compilers",
    "development-tools",
    "web-programming",
]
license = "MIT"
repository = "https://github.com/oxc-project/oxc"

[features]
benchmarking = []
default = ["regular_expression"]
mutate_tokens = []
regular_expression = ["dep:oxc_regular_expression"]

[lib]
name = "oxc_parser"
path = "src/lib.rs"

[[example]]
name = "parser"
path = "examples/parser.rs"

[[example]]
name = "parser_tsx"
path = "examples/parser_tsx.rs"

[[example]]
name = "regular_expression"
path = "examples/regular_expression.rs"

[[example]]
name = "visitor"
path = "examples/visitor.rs"

[dependencies.bitflags]
version = "2.10.0"

[dependencies.cow-utils]
version = "0.1.3"

[dependencies.memchr]
version = "2.7.6"

[dependencies.num-bigint]
version = "0.4.6"

[dependencies.num-traits]
version = "0.2.19"

[dependencies.oxc_allocator]
version = "0.135.0"

[dependencies.oxc_ast]
version = "0.135.0"

[dependencies.oxc_data_structures]
version = "0.135.0"
features = [
    "assert_unchecked",
    "fieldless_enum",
]

[dependencies.oxc_diagnostics]
version = "0.135.0"

[dependencies.oxc_ecmascript]
version = "0.135.0"

[dependencies.oxc_regular_expression]
version = "0.135.0"
optional = true

[dependencies.oxc_span]
version = "0.135.0"

[dependencies.oxc_str]
version = "0.135.0"

[dependencies.oxc_syntax]
version = "0.135.0"

[dependencies.rustc-hash]
version = "2"

[dependencies.seq-macro]
version = "0.3.6"

[dev-dependencies.oxc_ast]
version = "0.135.0"
features = ["serialize"]

[dev-dependencies.oxc_ast_visit]
version = "0.135.0"
features = ["serialize"]

[dev-dependencies.pico-args]
version = "0.5.0"

[lints.clippy]
allow_attributes = "warn"
branches_sharing_code = "allow"
clone_on_ref_ptr = "warn"
cognitive_complexity = "allow"
dbg_macro = "warn"
doc_markdown = "allow"
empty_drop = "warn"
empty_structs_with_brackets = "warn"
exit = "warn"
fallible_impl_from = "allow"
filetype_is_file = "warn"
fn_params_excessive_bools = "allow"
get_unwrap = "warn"
impl_trait_in_params = "allow"
infinite_loop = "warn"
iter_on_single_items = "warn"
map_with_unused_argument_over_ranges = "warn"
missing_const_for_fn = "allow"
multiple_crate_versions = "allow"
must_use_candidate = "allow"
non_send_fields_in_send_ty = "allow"
non_std_lazy_statics = "allow"
non_zero_suggestions = "warn"
option_if_let_else = "allow"
or_fun_call = "allow"
pathbuf_init_then_push = "warn"
precedence_bits = "warn"
print_stderr = "warn"
print_stdout = "warn"
pub_underscore_fields = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_clone = "warn"
rest_pat_in_fully_bound_structs = "warn"
result_large_err = "allow"
self_named_module_files = "warn"
significant_drop_in_scrutinee = "warn"
significant_drop_tightening = "allow"
similar_names = "allow"
struct_excessive_bools = "allow"
suspicious_operation_groupings = "warn"
todo = "warn"
too_long_first_doc_paragraph = "warn"
too_many_arguments = "allow"
too_many_lines = "allow"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
unnecessary_safety_comment = "warn"
unused_peekable = "warn"
unused_result_ok = "warn"
use_self = "allow"
useless_let_if_seq = "allow"
wildcard_imports = "allow"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.complexity]
level = "warn"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
absolute_paths_not_starting_with_crate = "warn"
non_ascii_idents = "warn"
tail_expr_drop_order = "warn"
unit-bindings = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_unsafe = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(coverage)",
    "cfg(coverage_nightly)",
]
