1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Revert "Fix some tree-sitter :match regexps"

This reverts commit 95091b77f0
of 2023-06-17, mistakenly pushed to emacs-29.

The patch will be installed on master instead, and backported later,
after Emacs 29.1 is released (bug#64019).

Do not merge to master.
This commit is contained in:
Basil L. Contovounesios 2023-06-17 20:39:16 +01:00
parent 0154f5885e
commit 02f0be0301
5 changed files with 12 additions and 15 deletions

View file

@ -106,7 +106,7 @@ name.")
(defconst js--plain-method-re
(concat "^\\s-*?\\(" js--dotted-name-re "\\)\\.prototype"
"\\.\\(" js--name-re "\\)\\s-*?=\\s-*?\\(\\(?:async[ \t\n]+\\)function\\)\\_>")
"\\.\\(" js--name-re "\\)\\s-*?=\\s-*?\\(\\(:?async[ \t\n]+\\)function\\)\\_>")
"Regexp matching an explicit JavaScript prototype \"method\" declaration.
Group 1 is a (possibly-dotted) class name, group 2 is a method name,
and group 3 is the `function' keyword.")
@ -3493,7 +3493,7 @@ This function is intended for use in `after-change-functions'."
:language 'javascript
:feature 'constant
'(((identifier) @font-lock-constant-face
(:match "\\`[A-Z_][0-9A-Z_]*\\'" @font-lock-constant-face))
(:match "\\`[A-Z_][A-Z_\\d]*\\'" @font-lock-constant-face))
[(true) (false) (null)] @font-lock-constant-face)
@ -3612,7 +3612,7 @@ This function is intended for use in `after-change-functions'."
:feature 'number
'((number) @font-lock-number-face
((identifier) @font-lock-number-face
(:match "\\`\\(?:NaN\\|Infinity\\)\\'" @font-lock-number-face)))
(:match "\\`\\(:?NaN\\|Infinity\\)\\'" @font-lock-number-face)))
:language 'javascript
:feature 'operator