aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJackson Ray Hamilton2019-03-08 16:29:02 -0800
committerJackson Ray Hamilton2019-04-08 22:48:21 -0700
commit8dae74236df2059b3df571f71733e2916ef55a58 (patch)
treef82e294c6f6959c97846da4d6ed8ad3416ce7f37 /src
parent4d2b5bbfebc040ca477f1156b44989b4e19bbc3e (diff)
downloademacs-8dae74236df2059b3df571f71733e2916ef55a58.tar.gz
emacs-8dae74236df2059b3df571f71733e2916ef55a58.zip
Propertize and font-lock JSXText and JSXExpressionContainers
This completes highlighting support for JSX, as requested in: - https://github.com/mooz/js2-mode/issues/140 - https://github.com/mooz/js2-mode/issues/330 - https://github.com/mooz/js2-mode/issues/409 * lisp/progmodes/js.el (js--name-start-chars): Extract part of js--name-start-re so it can be reused in another regexp. (js--name-start-re): Use js--name-start-chars. (js-jsx--font-lock-keywords): Use new matchers. (js-jsx--match-text, js-jsx--match-expr): New matchers to remove typical JS font-locking and extend the font-locked region, respectively. (js-jsx--tag-re, js-jsx--self-closing-re): New regexps matching JSX. (js-jsx--matched-tag-type, js-jsx--matching-close-tag-pos) (js-jsx--enclosing-curly-pos, js-jsx--enclosing-tag-pos) (js-jsx--at-enclosing-tag-child-p): New functions for parsing and analyzing JSX. (js-jsx--text-range, js-jsx--syntax-propertize-tag-text): New functions for propertizing JSXText. (js-jsx--syntax-propertize-tag): Propertize JSXText children of tags. (js-jsx--text-properties): Remove JSXText-related text properties when repropertizing. (js-mode): Extend the syntax-propertize region with syntax-propertize-multiline; we are now adding the syntax-multiline text property to buffer ranges that are JSXText to ensure the whole multiline JSX construct is reidentified.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions