Closed savq closed 1 year ago
Right now this PR has a small regression.
An expression like:
[2:x-1, 1]
Will be parsed as
(matrix_expression
(matrix_row (range_expression (integer_literal) (identifier)
(matrix_row (unary_expression (operator) (identifier))
(ERROR)
...)
Basically, it parses 2:x
and -1
as separate expressions so it thinks this is a matrix, not a vector.
I have no idea on how to handle the space-sensitive mode of the femtolisp parser.
Arrays:
_immediate_bracket
rule to scannerarray_expression
tovector_expression
array_comprehension_expression
tocomprehension_expression
index_expression
for typed arrays. There's no way to distinguish typed vectors from index expressions.test/corpus/collections.txt
file for tuples and arrays' tests.Tuples:
named_tuple_expression
rule separate fromtuple_expression
seq('(', rules, ')')
_do_parameter_list
optional_parameter
typed_parameter