tree-sitter/crates/generate/src
Will Lillis 68ec70520d fix(lib): address strict aliasing violations with Array type
Altering the `Array` type itself isn't feasible, as this causes
unacceptable breakage with existing parsers that depend on it. Instead,
pass in individual `Array` fields for to various `_array__*` functions.

Any time the `contents` of an array may be modified (`free`d, `realloc`d,
etc), return the potentially new address out by value. This prevents any
strict aliasing violations as we're no longer writing to a type-casted
pointer.

Co-authored-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
2026-01-20 23:53:24 -05:00
..
build_tables fix(rust): minor cleanup in generate code 2025-10-24 17:50:28 -04:00
prepare_grammar fix(rust): address nightly clippy lint 2025-12-27 17:05:53 -05:00
templates fix(lib): address strict aliasing violations with Array type 2026-01-20 23:53:24 -05:00
build_tables.rs feat: add option to disable parse state optimizations 2025-09-26 02:40:53 -04:00
dedup.rs Reorganize rust crates into a flat crates directory, simplify some CI steps (#4496) 2025-06-06 14:25:37 -07:00
dsl.js feat: remove the need of an external JS runtime for processing grammars 2025-09-16 02:24:11 -04:00
generate.rs refactor(generate)!: include path when available in IO errors 2025-11-14 11:28:00 +01:00
grammars.rs Reorganize rust crates into a flat crates directory, simplify some CI steps (#4496) 2025-06-06 14:25:37 -07:00
nfa.rs fix(generate): assert there is a Nfa last state before retrieving it 2025-09-16 03:51:13 -04:00
node_types.rs fix(generate): remove leftover imports of anyhow 2025-11-14 11:28:00 +01:00
parse_grammar.rs fix(generate): remove leftover imports of anyhow 2025-11-14 11:28:00 +01:00
parser.h.inc fix(generate): fix builds outside of crate workspace 2025-09-21 02:34:10 -04:00
prepare_grammar.rs fix(generate): remove leftover imports of anyhow 2025-11-14 11:28:00 +01:00
quickjs.rs feat(quickjs): add console support for Array 2025-12-31 13:32:09 +01:00
render.rs perf: reduce needless allocations 2025-10-30 18:24:42 +01:00
rules.rs fix(rust): apply Self usage in struct definition lint 2025-10-24 17:50:28 -04:00
tables.rs Reorganize rust crates into a flat crates directory, simplify some CI steps (#4496) 2025-06-06 14:25:37 -07:00