Skip to content

Commit

Permalink
Make fail parser type parametrized
Browse files Browse the repository at this point in the history
  • Loading branch information
wlad031 committed Feb 21, 2024
1 parent 9c98615 commit 61e8acd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val root = project
scalaVersion := "3.3.1",
organization := "dev.vgerasimov",
name := "slowparse",
version := "0.1.4",
version := "0.2.0",
githubOwner := "wlad031",
githubRepository := "slowparse",
publishConfiguration := publishConfiguration.value.withOverwrite(true),
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/dev/vgerasimov/slowparse/parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ object Parsers:
val success: P[Unit] = input => Success((), "", input)

/** Always failing parser. */
val fail: P[Unit] = input => Failure("this parser always fails")
def fail[A]: P[A] = input => Failure("this parser always fails")

/** Parses any single end-of-line character. */
val eol: P[Unit] = anyFrom("\n\r").label("eol")
Expand Down

0 comments on commit 61e8acd

Please sign in to comment.