(keyword string escape-sequence)
(constant expression identifier number pattern property)
(function bracket delimiter)))
- (setq-local syntax-propertize-function #'ts-ts--syntax-propertize)
+ (setq-local syntax-propertize-function #'typescript-ts--syntax-propertize)
(treesit-major-mode-setup)))
(treesit-major-mode-setup)))
-(defvar ts-ts--s-p-query
+(defvar typescript-ts--s-p-query
(when (treesit-available-p)
(treesit-query-compile 'typescript
'(((regex pattern: (regex_pattern) @regexp))))))
((parenthesized_expression (jsx_element) @jsx))
((return_statement (jsx_element) @jsx))))))
-(defun ts-ts--syntax-propertize (beg end)
- (let ((captures (treesit-query-capture 'typescript ts-ts--s-p-query beg end)))
- (ts-ts--syntax-propertize-captures captures)))
+(defun typescript-ts--syntax-propertize (beg end)
+ (let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query beg end)))
+ (tsx-ts--syntax-propertize-captures captures)))
(defun tsx-ts--syntax-propertize (beg end)
(let ((captures (treesit-query-capture 'tsx tsx-ts--s-p-query beg end)))
- (ts-ts--syntax-propertize-captures captures)))
+ (tsx-ts--syntax-propertize-captures captures)))
-(defun ts-ts--syntax-propertize-captures (captures)
+(defun tsx-ts--syntax-propertize-captures (captures)
(pcase-dolist (`(,name . ,node) captures)
(let* ((ns (treesit-node-start node))
(ne (treesit-node-end node))