brick/Cargo.toml
trvon e03fa40ccc
fix(c): parse .c files with the C grammar
`.c` files were parsed with tree-sitter-cpp, so valid C that uses C++
keywords as identifiers (`int delete = 0; int new = 1;`, a parameter
named `class`) produced grammar-error diagnostics and lost symbols.

`.c` files now parse with tree-sitter-c (pinned =0.24.2, backend
`c:0.24.2`) while staying on the shared C/C++ extraction path, so C
sources and the headers they include still share one include/declaration
index. Headers (`.h`) keep the C++ grammar, which parses the C subset.

Test: cpp_xtu::c_sources_parse_with_the_c_grammar fails before this
change (grammar errors in util.c).
2026-09-24 20:14:21 -06:00

32 lines
818 B
TOML

[package]
name = "brick"
version = "0.1.0"
edition = "2024"
description = "Evidence-aware code structure visualization"
license = "Apache-2.0"
[features]
default = []
tree-sitter-p4-pilot = ["dep:tree-sitter-p4"]
[dependencies]
anyhow = "1.0"
clap = { version = "4.6", features = ["derive"] }
regex = "1.12"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tree-sitter = "=0.26.13"
tree-sitter-c = "=0.24.2"
tree-sitter-cpp = "=0.23.4"
tree-sitter-javascript = "=0.25.0"
tree-sitter-typescript = "=0.23.2"
tree-sitter-dart = "=0.2.0"
tree-sitter-rust = "=0.24.2"
tree-sitter-p4 = { git = "https://github.com/duskmoon314/tree-sitter-p4", rev = "19b9dbdc2a2fb1d6c1b5346a75537434892a94b1", optional = true }
[dev-dependencies]
tempfile = "3.27"
[profile.release]
lto = "thin"
strip = "debuginfo"