Commit graph

14 commits

Author SHA1 Message Date
c191486864 Simplify creating TableLitElem 2022-11-22 16:35:16 +01:00
45caafdc38 Simplify creating Lit 2022-11-22 16:29:31 +01:00
fafc567447 Simplify creating Expr 2022-11-22 16:29:21 +01:00
d4797c5894 Simplify creating string literal from ident 2022-11-22 10:32:17 +01:00
0e9cfd67c2 Switch TablConstr to BoundedSeparated 2022-11-21 23:54:40 +01:00
e3fa3500d4 Switch TableLit and Program to BoundedSeparated 2022-11-21 23:54:30 +01:00
03e7f10739 Satisfy warnings 2022-11-20 22:16:10 +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
9658907d76 Make string literal Debug more compact 2022-11-20 17:36:28 +01:00
82e5b589e1 Parse string literals 2022-11-20 17:36:16 +01:00
867595b5b9 Remove multiline string literals from ast 2022-11-20 17:14:43 +01:00
e2bb847577 Simplify imports 2022-11-19 11:01:09 +01:00
a82b625631 Add builtins to ast and parse them 2022-11-18 21:17:05 +01:00
037a0f69a3 Split up and expand ast 2022-11-18 19:37:51 +01:00