roc/crates/compiler/parse/src
Joshua Warner 2d9aba2242
Refactor parser methods to not return State as part of ParseError
As previously discovered with #4464, it's easy to accidentally mis-use the State value returned on the Err path.

There were mixed assumptions about what that State represents: (1) the State where the error occurred, or (2) the State at the beginning of the thing we were just parsing.

I fixed this up to always mean (2) - at which point we don't actually need to return the State at all - so it's impossible for further discrepency to creep in.

I also took the liberty to refactor a few more methods to be purely combinator-based, rather than calling `parse` directly.
2022-11-18 19:52:23 -05:00
..
ast.rs Implement tuple pattern parsing 2022-11-13 16:11:57 -05:00
blankspace.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
expr.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
header.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
ident.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
keyword.rs parse expect-fx 2022-08-09 14:19:12 +02:00
lib.rs correct formatting and removed duplicate image 2022-11-03 20:02:10 +11:00
module.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
number_literal.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
parser.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
pattern.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
problems.rs moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00
state.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
string_literal.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00
test_helpers.rs Refactor Parser trait to pass min_indent 2022-10-31 13:31:47 -07:00
type_annotation.rs Refactor parser methods to not return State as part of ParseError 2022-11-18 19:52:23 -05:00