-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
refactorinternal change, cleanup, code-style-improvementinternal change, cleanup, code-style-improvement
Description
since we changed the parse-strategy from panic at first error, to collect & recover we still return a lot of Results, although we will never return an Error but instead return an EmptyStatement.
This leads to lots of unnecessary unwrapping - or passing on Results - where it is not necessary and it just makes the code more verbose.
Inspect the parse-methods carefully and see if it really ever returns an Err, if not, get rid of the PResult. Since this is a recursive-decent parser this is probably easier to apply bottom-up. (starting from literals, leaf-expression, expressoins, control-statements, etc.
Metadata
Metadata
Assignees
Labels
refactorinternal change, cleanup, code-style-improvementinternal change, cleanup, code-style-improvement