Commit graph

10 commits

Author SHA1 Message Date
74e43e61ce Parser: Clean up more things and make sure to not deinit uninitialized data 2021-12-19 00:28:35 +01:00
0995739ca8 Parser: Do a better job at cleaning up temporary allocations
-fsanitize=memory no longer finds any memory leak in the parser test suite.
We don't yet test error cases, but still pretty good :).
2021-12-18 21:42:48 +01:00
d312500a5b parser: Remove useless result var in parse_fragment
Was always PF_OK
2021-12-18 21:39:09 +01:00
54f27e448c Parser: Skip inner bracket separators after every list element
Forgot that here.
2021-12-18 16:12:21 +01:00
fd24623c27 parser: Set the position of a call to the open parenthesis 2021-12-17 21:07:12 +01:00
e79945a398 Continue work on parser
- Simplify return types: Many functions that returned
  `enum parse_fragment_result` only ever returned PF_OK or PF_ERROR.
  Changing these functions to return bool simplifies things a lot. This
  also helped in identifying some places where I didn't handle all
  parse_fragment_result values properly.
- More cleaning up
- Allow linebreaks inside parenthesis
2021-12-16 22:09:59 +01:00
d853ba40ad parser: Fix parsing assignments 2021-12-16 22:09:59 +01:00
c288c333ca Continue work on parser
Seems that we can parse most things now :). Assignments don't work yet,
thoug. Also we're currently leaking memory pretty badly.
2021-12-15 21:47:17 +01:00
09d51b9080 Parser: Make the parser object own the token
This simplifies the code a bit, since the methods now don't have to deinit
the token themselves any more.
2021-12-15 21:47:17 +01:00
d094ed7bd5 Initial commit 2021-12-15 21:47:17 +01:00