The main goal of this PR is to reduce duplication and remove unnecessary conflicts in the grammar. In particular, removing parameter and function signatures rules, since Julia doesn't have distinct syntactic constructs for these (they're parsed as expressions).
Breaking changes:
Remove short_function_definition
short functions are now parsed as (= (call …) …) (like JuliaSyntax)
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 bare_tuple to open_tuple (to contrast with _closed_macrocall and _closed_assignment).
Rename relative_qualifier to import_path (like JuliaSyntax).
The main goal of this PR is to reduce duplication and remove unnecessary conflicts in the grammar. In particular, removing parameter and function signatures rules, since Julia doesn't have distinct syntactic constructs for these (they're parsed as expressions).
Breaking changes:
short_function_definition
(= (call …) …)
(like JuliaSyntax)signature
rule infunction_definition
andmacro_definition
unary_typed_expression
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._closed_assignment
to handle assignments inside brackets, where they cannot contain open tuples.bare_tuple
toopen_tuple
(to contrast with_closed_macrocall
and_closed_assignment
).relative_qualifier
toimport_path
(like JuliaSyntax).Internal changes:
_quotable
_number
_operation
Closes #88 Closes #98 Closes #113 Closes #119 Closes #129 Closes #125