Skip to content

Commit ff1dfac

Browse files
authored
Update basic examples for Scala 3.5 and later (#331)
solves #320 Basic examples run into error `No given instance of type fastparse.ParsingRun[$]` since Scala 3.5. This can be manually worked around by replacing `parse("a", parseA(_))` with `parse("a", using _)` since a `using` keyword is now required.
1 parent d8f95da commit ff1dfac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

readme/WritingParsers.scalatex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
@p
1313
Such a parser returns a @hl.scala{Parsed.Success} if the input matches the string, and otherwise returns a @hl.scala{Parsed.Failure}.
14+
15+
@p
16+
@b{Note}: if using Scala 3.5 or later, calls to the @code{parse} function should include the keyword @code{using}, e.g. @code{parse("a", parseA(using _))}.
17+
1418
@p
1519
As you can see, by default the @hl.scala{Parsed.Success} contains
1620
a @hl.scala{(): Unit}, unless you use @sect.ref{Capture} or

0 commit comments

Comments
 (0)