Closed jcaesar closed 1 year ago
At a glance, I think my preferred solution would be to have two separate consume_declaration
and parse_declaration
functions. Will handle it when I have the time.
@PoignardAzur How about just making parse_declaration_tokens
public? (I'd argue that if you hand ownership of a list of tokens, you'd want them to be fully consumed.)
Right, I wasn't up-to-date on that part of the code.
I created #44 based on your PR. I think it addresses all your concerns?
Tested it, does.
Current venial parses
struct Good {} bad
and silently ignoresbad
or any other trailing junk tokens. I'm not sure what the best way to deal with that is, but I think that should be an error.(Origin issue: https://github.com/jcaesar/structstruck/issues/4)