Commit graph

9 commits

Author SHA1 Message Date
198f56226e Switch TablePattern to BoundedSeparated 2022-11-21 23:57:58 +01:00
6533c9dcf7 Handle things separated by things differently
I noticed that programs like '{} would parse correctly while '{ } would
expect an inner element. This was because the leading space was actually
part of the element parser, which is a violation of the (as of yet
unspoken) rule that parsers should not parse surrounding whitespace.

Because whitespace whas treated differently from everywhere else and
because this implementation was wrong, I decided to reimplement it,
abstracting the concept of things separated by other things with
optional trailing things. I did this in such a way that surrounding
whitespace is not touched.
2022-11-20 21:09:59 +01:00
ea7518b183 Create each main parser only once 2022-11-19 20:56:10 +01:00
b291619d10 Remove unnecessary Clone bounds 2022-11-19 19:36:10 +01:00
ff3edf17e5 Parse anonymous function definitions 2022-11-19 19:13:30 +01:00
9c8d09e3cb Box pub parsers and adjust visibility 2022-11-19 13:00:43 +01:00
408219073a Parse binary operators
For now, they're all left associative.
2022-11-19 12:40:52 +01:00
5466f7afbf Turn strs into chars where possible 2022-11-18 22:07:42 +01:00
73e32252c4 Parse table destructuring 2022-11-18 21:44:25 +01:00