It's said in e769064 that the parser can partialy return multiple errors, it's normal and it can only return multiple errors when an unexpected token is in the while let loop of the function parse() because after the smaller function need to return something and for the moment I don't know how to do it.
But it's planed to when an error occur while parsing a function definition or declaration, to skip tokens related to this AST and push the error into the list and continue parse other function definition / declaration etc ...
(MAYBE) in the expect_token! macro when the token we got isn't what we would want, push the error with context.push_err and try to recall the macro, but idk if it's a good idea ??
It's said in e769064 that the parser can partialy return multiple errors, it's normal and it can only return multiple errors when an unexpected token is in the
while let
loop of the function parse() because after the smaller function need to return something and for the moment I don't know how to do it.But it's planed to when an error occur while parsing a function definition or declaration, to skip tokens related to this AST and push the error into the list and continue parse other function definition / declaration etc ...
Originally posted by @Larsouille25 in https://github.com/zom-lang/zom/issues/30#issuecomment-1669418927
Some improvements :
expect_token!
macro when the token we got isn't what we would want, push the error withcontext.push_err
and try to recall the macro, but idk if it's a good idea ??