tree-sitter.tree-sitter/test/fixtures/test_grammars
Amaan Qureshi 74b7d0c951 feat!: add an eof function
This commit adds an `eof()` function for grammars, which is easier to
use than the NUL byte directly. It compiles down to a constraint that
the enclosing production can only reduce at end of input, not to a
shiftable token.

BREAKING CHANGE: Public error types for `tree-sitter-generate` were modified.

Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2026-08-21 20:02:58 -04:00
..
aliased_inlined_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
aliased_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
aliased_token_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
aliased_unit_reductions feat: migrate to ESM 2025-09-16 02:24:11 -04:00
aliases_in_root feat: migrate to ESM 2025-09-16 02:24:11 -04:00
anonymous_error feat: migrate to ESM 2025-09-16 02:24:11 -04:00
anonymous_tokens_with_escaped_chars feat: migrate to ESM 2025-09-16 02:24:11 -04:00
associativity_left feat: migrate to ESM 2025-09-16 02:24:11 -04:00
associativity_left_with_lower_precedence_shift fix(generate): honor right associativity despite a lower-precedence shift 2026-07-27 02:06:35 -04:00
associativity_missing feat: migrate to ESM 2025-09-16 02:24:11 -04:00
associativity_right feat: migrate to ESM 2025-09-16 02:24:11 -04:00
associativity_right_with_lower_precedence_shift fix(generate): honor right associativity despite a lower-precedence shift 2026-07-27 02:06:35 -04:00
basic_cst feat(test): allow corpus tests to use cst outputs 2026-08-09 15:48:37 -05:00
conflict_in_repeat_rule feat: migrate to ESM 2025-09-16 02:24:11 -04:00
conflict_in_repeat_rule_after_external_token feat: migrate to ESM 2025-09-16 02:24:11 -04:00
conflicting_precedence feat: migrate to ESM 2025-09-16 02:24:11 -04:00
depends_on_column feat: migrate to ESM 2025-09-16 02:24:11 -04:00
duplicate_reduction_precedence feat!: add an eof function 2026-08-21 20:02:58 -04:00
dynamic_precedence feat: migrate to ESM 2025-09-16 02:24:11 -04:00
eof_basic feat!: add an eof function 2026-08-21 20:02:58 -04:00
eof_dropped_branch feat!: add an eof function 2026-08-21 20:02:58 -04:00
eof_duplicate_reduction feat!: add an eof function 2026-08-21 20:02:58 -04:00
eof_misplaced feat!: add an eof function 2026-08-21 20:02:58 -04:00
eof_repeat_terminated feat!: add an eof function 2026-08-21 20:02:58 -04:00
eof_repeat_via_nullable_rule feat!: add an eof function 2026-08-21 20:02:58 -04:00
eof_repeat_via_rule feat!: add an eof function 2026-08-21 20:02:58 -04:00
epsilon_external_extra_tokens feat: migrate to ESM 2025-09-16 02:24:11 -04:00
epsilon_external_tokens feat: migrate to ESM 2025-09-16 02:24:11 -04:00
epsilon_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
external_and_internal_anonymous_tokens feat: migrate to ESM 2025-09-16 02:24:11 -04:00
external_and_internal_tokens feat: migrate to ESM 2025-09-16 02:24:11 -04:00
external_extra_tokens feat: migrate to ESM 2025-09-16 02:24:11 -04:00
external_lookahead_eof_boundary fix(lib): Consider subtree lookahead bytes when determining whether the 2026-06-01 18:12:56 -04:00
external_tokens fix(wasm): fix alias map size computation 2025-09-18 18:34:27 -04:00
external_unicode_column_alignment feat: migrate to ESM 2025-09-16 02:24:11 -04:00
extra_non_terminals feat: migrate to ESM 2025-09-16 02:24:11 -04:00
extra_non_terminals_with_shared_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
get_col_eof feat: migrate to ESM 2025-09-16 02:24:11 -04:00
get_col_should_hang_not_crash feat: migrate to ESM 2025-09-16 02:24:11 -04:00
immediate_tokens feat: migrate to ESM 2025-09-16 02:24:11 -04:00
indirect_recursion_in_transitions perf(generate): represent the grammar IR as a flat, pooled arena 2026-08-09 12:28:50 -05:00
inline_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
inlined_aliased_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
inverted_external_token feat: migrate to ESM 2025-09-16 02:24:11 -04:00
invisible_start_rule feat: migrate to ESM 2025-09-16 02:24:11 -04:00
last_child_anchor_past_hidden_repeat fix(lib): continue search for later named siblings in 2026-08-07 17:54:36 -04:00
lexical_conflicts_due_to_state_merging feat: migrate to ESM 2025-09-16 02:24:11 -04:00
named_precedences feat: migrate to ESM 2025-09-16 02:24:11 -04:00
named_rule_aliased_as_anonymous feat: migrate to ESM 2025-09-16 02:24:11 -04:00
nested_inlined_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
next_sibling_from_zwt feat: migrate to ESM 2025-09-16 02:24:11 -04:00
partially_resolved_conflict feat: migrate to ESM 2025-09-16 02:24:11 -04:00
precedence_on_single_child_missing feat: migrate to ESM 2025-09-16 02:24:11 -04:00
precedence_on_single_child_negative feat: migrate to ESM 2025-09-16 02:24:11 -04:00
precedence_on_single_child_positive feat: migrate to ESM 2025-09-16 02:24:11 -04:00
precedence_on_subsequence feat: migrate to ESM 2025-09-16 02:24:11 -04:00
precedence_on_token feat: migrate to ESM 2025-09-16 02:24:11 -04:00
readme_grammar feat: migrate to ESM 2025-09-16 02:24:11 -04:00
reserved_words feat: migrate to ESM 2025-09-16 02:24:11 -04:00
start_rule_is_blank feat: migrate to ESM 2025-09-16 02:24:11 -04:00
start_rule_is_token feat: migrate to ESM 2025-09-16 02:24:11 -04:00
terminal_supertype fix(generate): error if supertype is defined as a terminal rule 2026-01-30 22:35:41 -05:00
unicode_classes feat: migrate to ESM 2025-09-16 02:24:11 -04:00
unused_rules feat: migrate to ESM 2025-09-16 02:24:11 -04:00
uses_current_column feat: migrate to ESM 2025-09-16 02:24:11 -04:00
utf16_surrogate_oob lexer: pass code-unit length to U16_NEXT in UTF-16 decoders 2026-04-26 03:38:47 -04:00
wasm_realloc_clobber_region fix(wasm): when reallocating the last allocated region, properly grow 2026-01-31 18:24:31 -05:00
wasm_realloc_overflow_heap Allow using Tree-sitter rust lib in multi-threaded web apps compiled to wasm32-unknown-unknown (#5851) 2026-08-14 17:05:42 -07:00
readme.md Rename spec -> test 2017-03-09 20:40:01 -08:00

These small grammars demonstrate specific features or test for certain specific regressions.

For some of them, compilation is expected to fail with a given error message. For others, the resulting parser is expected to produce certain trees.