Skip to content

Remove PResult where possible in parser #196

@riederm

Description

@riederm

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-improvement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions