• Jackson Ray Hamilton's avatar
    Font-lock JSX while editing it by extending regions · 539191cc
    Jackson Ray Hamilton authored
    * lisp/progmodes/js.el (js-jsx--font-lock-keywords):
    Call tag beginning and end matchers.
    (js-jsx--match-tag-beg, js-jsx--match-tag-end): New functions.
    (js-jsx--syntax-propertize-tag): Record buffer positions of JSXElement
    beginning and end for font-locking.
    
    (js--syntax-propertize-extend-region)
    (js-jsx--syntax-propertize-extend-region): New functions for extending
    the syntax-propertize region backwards to the start of a JSXElement so
    its JSXAttribute children on its n+1th lines can be parsed as such
    while editing those lines.
    (js-mode): Add js--syntax-propertize-extend-region to
    syntax-propertize-extend-region-functions.
    539191cc
js.el 148 KB