Skip to content

Commit

Permalink
Version bump and backported the latest fix on 4.2 series
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Jan 30, 2023
1 parent 8a8ae5b commit 680b206
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Parsley is a fast and modern parser combinator library for Scala based loosely o
Parsley is distributed on Maven Central, and can be added to your project via:

```scala
libraryDependencies += "com.github.j-mie6" %% "parsley" % "4.1.3"
libraryDependencies += "com.github.j-mie6" %% "parsley" % "4.1.5"
```

Documentation can be found [**here**](https://javadoc.io/doc/com.github.j-mie6/parsley_2.13/latest/index.html)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ private [deepembedding] final class Seq[A](private [backend] var before: DoublyL
this
}
}
case r <** (p: Seq[_]) => mergeFromRight(p, chooseInto(r))
case r <** (p: Seq[_]) =>
assume(after.size == 1 && (after.head eq p), "after can only contain just p, which is going to get flattened, so it can be dropped")
after.clear()
mergeFromRight(p, chooseInto(r))
// shift pure to the right by swapping before and after (before is empty linked list!)
case (_: Pure[_]) <** _ =>
assume(before.isEmpty, "empty can reuse before instead of allocating a new list because before is empty")
Expand Down

0 comments on commit 680b206

Please sign in to comment.