mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-18 11:00:16 +00:00
Revert "Lints"
This reverts commit f7e85b5295a44217bde9b6b83d188d84ee863d0c.
This commit is contained in:
parent
f3689b1146
commit
a6cf21dcf9
8 changed files with 40 additions and 37 deletions
|
@ -1152,7 +1152,7 @@ where
|
|||
move |arena: &'a Bump, state: State<'a>| {
|
||||
// We have to clone this because if the optional parser fails,
|
||||
// we need to revert back to the original state.
|
||||
let original_state = state;
|
||||
let original_state = state.clone();
|
||||
|
||||
match parser.parse(arena, state) {
|
||||
Ok((progress, out1, state)) => Ok((progress, Some(out1), state)),
|
||||
|
@ -1196,7 +1196,7 @@ macro_rules! loc {
|
|||
macro_rules! skip_first {
|
||||
($p1:expr, $p2:expr) => {
|
||||
move |arena, state: $crate::state::State<'a>| {
|
||||
let original_state = state;
|
||||
let original_state = state.clone();
|
||||
|
||||
match $p1.parse(arena, state) {
|
||||
Ok((p1, _, state)) => match $p2.parse(arena, state) {
|
||||
|
@ -1215,7 +1215,7 @@ macro_rules! skip_first {
|
|||
macro_rules! skip_second {
|
||||
($p1:expr, $p2:expr) => {
|
||||
move |arena, state: $crate::state::State<'a>| {
|
||||
let original_state = state;
|
||||
let original_state = state.clone();
|
||||
|
||||
match $p1.parse(arena, state) {
|
||||
Ok((p1, out1, state)) => match $p2.parse(arena, state) {
|
||||
|
@ -1330,7 +1330,7 @@ macro_rules! and {
|
|||
move |arena: &'a bumpalo::Bump, state: $crate::state::State<'a>| {
|
||||
// We have to clone this because if the first parser passes and then
|
||||
// the second one fails, we need to revert back to the original state.
|
||||
let original_state = state;
|
||||
let original_state = state.clone();
|
||||
|
||||
match $p1.parse(arena, state) {
|
||||
Ok((p1, out1, state)) => match $p2.parse(arena, state) {
|
||||
|
@ -1709,7 +1709,7 @@ where
|
|||
Error: 'a,
|
||||
{
|
||||
move |arena: &'a Bump, state: State<'a>| {
|
||||
let old_state = state;
|
||||
let old_state = state.clone();
|
||||
|
||||
match parser.parse(arena, state) {
|
||||
Ok((_, a, s1)) => Ok((NoProgress, a, s1)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue