Will Lillis
8bb33f7d8c
perf: reorder conditional operands
...
(cherry picked from commit 854f527f6e )
2025-07-13 20:05:01 +02:00
Antonin Delpeuch
3bd8f7df8e
perf: More efficient computation of used symbols
...
As the call to `symbol_is_used` does not depend
on the production, it is more efficient to call it
only once outside the loop over productions.
I'm not sure if `rustc` is able to do this optimization
on its own (it would need to know that the function
is pure, which sounds difficult in general).
(cherry picked from commit 36d93aeff3 )
2025-07-10 09:25:22 +02:00
Will Lillis
d7529c3265
perf: reserve Vec capacities where appropriate
...
(cherry picked from commit 1e7d77c517 )
2025-07-09 22:33:57 -04:00
Will Lillis
6b84118e33
fix(generate): only display conflicting symbol name in non-terminal
...
word token error message if available
(cherry picked from commit a9818e4b17 )
2025-06-26 15:40:48 +02:00
James McCoy
415a657d08
fix(test): remove period in test_flatten_grammar_with_recursive_inline_variable
...
The period was dropped in the `thiserror` refactor
(79444e07f9 ), which caused the
`test_flatten_grammar_with_recursive_inline_variable` test to fail.
Signed-off-by: James McCoy <jamessan@jamessan.com>
(cherry picked from commit a6e530b33d )
2025-06-06 16:39:45 +02:00
Jon Shea
e295c99eca
fix(rust): clarify error message for non-token reserved words
...
Improve the `NonTokenReservedWord` error message by including the
specific reserved word that was not used as a token.
(cherry picked from commit 92c5d3b8e2 )
2025-04-10 01:10:25 -04:00
Yuri Astrakhan
9dbe165296
chore: a few minor lints
...
* do not use `&` for the format args as it cannot (yet) be optimized by the compiler
* a few format inlining
2025-01-21 00:57:58 -05:00
Amaan Qureshi
d38aa596e1
fix(generate): improve error message when a duplicate token is used as the word token
2025-01-10 02:58:38 -05:00
WillLillis
867433afd7
feat(rust): use thiserror for generate crate
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2025-01-05 00:27:12 -05:00
Max Brunsfeld
201b41cf11
feat: add 'reserved word' construct
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-23 03:06:32 -05:00
Amaan Qureshi
310a9f0704
fix: disallow tokens that match the empty string
2024-11-02 03:36:11 -04:00
Amaan Qureshi
7baefa8609
fix(cli): use contains over is in warning
2024-11-02 01:31:46 -04:00
Amaan Qureshi
42dd32d184
build: remove unicode files and script, move cliff.toml
2024-10-26 23:25:12 +00:00
Amaan Qureshi
c8cf75fd30
feat(generate)!: use regex_syntax::Hir for expanding regexes
...
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-10-26 23:25:12 +00:00
Will Lillis
5c6445edea
chore: misc clippy lints
2024-10-06 17:55:00 -04:00
Amaan Qureshi
49bda0e2c5
fix(generate): filter out unused rules in other spots
2024-10-03 19:32:09 -04:00
Amaan Qureshi
99a0ddc4c2
fix(generate): remove unused rules
2024-10-03 16:40:51 -04:00
Amaan Qureshi
31f24395b4
feat: move generate logic to its own crate
2024-09-27 17:04:21 -04:00