1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-08 15:30:40 -08:00
emacs/test/lisp/progmodes/rust-ts-mode-resources
Steven Allen f0b987c32c rust-ts-mode: handle invalid rust syntax without signaling
Don't signal an error when encountering invalid rust syntax.  Without
this patch, invalid rust code would prevent a chunk of the buffer from
being highlighted (bug#79272).

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--fontify-scope):
(rust-ts-mode--fontify-pattern): Avoid calling `string-match-p' on nil
when a node is missing a parent.
* test/lisp/progmodes/rust-ts-mode-resources/font-lock-no-parent.rs:
Rust file that reproduces the issue.
* test/lisp/progmodes/rust-ts-mode-tests.el: Test case to reproduce the
issue.
2025-08-21 19:59:04 +03:00
..
font-lock-no-parent.rs rust-ts-mode: handle invalid rust syntax without signaling 2025-08-21 19:59:04 +03:00
font-lock-number.rs
font-lock.rs