Handle typescript ts grammar breaking change for function_expression
authorLoïc Lemaître <loic.lemaitre@gmail.com>
Sun, 11 Feb 2024 03:00:38 +0000 (05:00 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Sun, 11 Feb 2024 03:00:38 +0000 (05:00 +0200)
commit9f9da26e0dcb242327af7cd8414fad7afedbbaa9
tree36fdf7c8e48f1ed05ea32bc558d27478415389bf
parent717d8c4285fa6eecc0bbec9b5910f028f02aab59
Handle typescript ts grammar breaking change for function_expression

Starting from version 0.20.4 of the typescript/tsx grammar, "function"
becomes "function_expression". The right expression is used depending
on the grammar version.

* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--font-lock-compatibility-function-expression):
New function (bug#69024).
(typescript-ts-mode--font-lock-settings): Use it.

Copyright-paperwork-exempt: yes
lisp/progmodes/typescript-ts-mode.el