tree-sitter-julia icon indicating copy to clipboard operation
tree-sitter-julia copied to clipboard

Breaking: Refactor signatures (take 2) and other stuff

Open savq opened this issue 3 months ago • 0 comments

Breaking changes:

  • Remove short_function_definition
    • short functions are now parsed as (= (call …) …) similar to the actual julia parser.
  • Add visible signature rule in function_definition and macro_definition
    • This acts as a wrapper around a call or an argument list (if the function is anonymous).
  • Add unary_typed_expression
    • Like typed_expression, this is a separate rule to make it easier to highlight the RHS as a type, tho it could probably be improved further.
  • Add _closed_assignment to handle assignments inside brackets, where they cannot contain open tuples.
  • Rename argument_list to arguments.
  • Rename bare_tuple to open_tuple.
  • Rename relative_qualifier to import_path (the name used in JuliaSyntax).

Internal changes:

  • Remove _quotable
  • Remove _number
  • Refactor _operation

Closes #88 Closes #98 Closes #113 Closes #119 Closes #129 Closes #125


This PR is kind of messy, but most of these changes are ports of improvements I've done while rewriting the julia lezer grammar.

savq avatar Mar 31 '24 00:03 savq