Rename array_comprehension_expression to comprehension_expression.
Allow newlines in matrices and comprehensions.
Allow multiple semicolon terminators:
This allows n-dimensional concatenation inside arrays,
Outside arrays multiple semicolons are ignored.
Define index_expression in terms of arrays. There's no way to
distinguish typed arrays from indexing.
Update tests.
Move tests for tuples and arrays to collections.txt
Tuples and parameters
Add parenthesize function to simplify the repeated pattern: seq('(', rules, ')')
Allow tuples in _do_parameter_list
Allow tuples in optional_parameter
Allow tuples in typed_parameter
Allow trailing comma in parameter_list and keyword_parameters
Interpolations
Allow interpolation_expression in type and module definition names
Allow interpolation_expression in _function_signature
Allow interpolation_expression in parameter_list
Allow interpolation_expression in the RHS of field_expression
Operators
Add rules for pair and pipes operators.
Add _operator to quote_expression, including exceptions for
unary-and-binary operators and the parenthesized equals :(=).
Rename spread_expression to splat_expression.
Rename _dotty_operator to _ellipsis_operator.
Rename colon_range precedence to colon (and remove colon_quote).
Use prefix precedence for quote_expression.
Use right associativity for all prefix operators.
Allow quote_expression in the RHS of field_expression.
Use immediate colon : in ranges to distinguish from
ternary_expression. This is only needed in whitespace sensitive
contexts, but it's easier to it require everywhere.
Macros and assignments
Add _closed_macrocall_expression for function-like macros
Allow scoped macrocalls (Mod.@mac)
Allow assignments and bare tuples in macrocall_expression
Allow assignments and bare tuples in short_function_definition
Allow bare tuples in declarations
Allow closed macros in parameter_list (e.g. @nospecialize)
Allow parametrized_type_expression to assignment LHS
Allow typed_parameter in const declarations (for const fields)
Arrays
_immediate_bracket
rule to scanner.array_expression
tovector_expression
.array_comprehension_expression
tocomprehension_expression
.index_expression
in terms of arrays. There's no way to distinguish typed arrays from indexing.collections.txt
Tuples and parameters
seq('(', rules, ')')
_do_parameter_list
optional_parameter
typed_parameter
parameter_list
andkeyword_parameters
Interpolations
interpolation_expression
in type and module definition namesinterpolation_expression
in_function_signature
interpolation_expression
inparameter_list
interpolation_expression
in the RHS offield_expression
Operators
_operator
toquote_expression
, including exceptions for unary-and-binary operators and the parenthesized equals:(=)
.spread_expression
tosplat_expression
._dotty_operator
to_ellipsis_operator
.colon_range
precedence tocolon
(and removecolon_quote
).quote_expression
.quote_expression
in the RHS offield_expression
.:
in ranges to distinguish fromternary_expression
. This is only needed in whitespace sensitive contexts, but it's easier to it require everywhere.Macros and assignments
_closed_macrocall_expression
for function-like macrosMod.@mac
)macrocall_expression
short_function_definition
parameter_list
(e.g.@nospecialize
)parametrized_type_expression
toassignment
LHStyped_parameter
in const declarations (for const fields)Finally, allow emoji identifiers 🎉