emacs-tree-sitter / elisp-tree-sitter

Emacs Lisp bindings for tree-sitter
https://emacs-tree-sitter.github.io
MIT License
822 stars 74 forks source link

[javascript] Handle jsx nodes #91

Open danielpza opened 3 years ago

danielpza commented 3 years ago
<button className='primary' type='button'>
    Click Me
</button>;

<button />;
<Button />;

image

Expected button ~and Button to have the same color~ to have some color like Button does, and do some coloring to the properties className and type

debug:

program:
  expression_statement:
    jsx_element:
      jsx_opening_element:
        identifier:
        jsx_attribute:
          property_identifier:
          string:
        jsx_attribute:
          property_identifier:
          string:
      jsx_text:
      jsx_closing_element:
        identifier:
  expression_statement:
    jsx_self_closing_element:
      identifier:
  expression_statement:
    jsx_self_closing_element:
      identifier: