From 0a31c318ab3a6f04c09d7b0a2d35999157867bc0 Mon Sep 17 00:00:00 2001 From: Luis Osa Date: Sat, 9 Aug 2025 19:05:49 +0200 Subject: [PATCH 1/2] Update basic examples for Scala 3.5 and later 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 now appears to be required. --- readme/WritingParsers.scalatex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme/WritingParsers.scalatex b/readme/WritingParsers.scalatex index eada6dbf..7fffeaa4 100644 --- a/readme/WritingParsers.scalatex +++ b/readme/WritingParsers.scalatex @@ -11,6 +11,10 @@ @p Such a parser returns a @hl.scala{Parsed.Success} if the input matches the string, and otherwise returns a @hl.scala{Parsed.Failure}. + + @p + @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 _))}. + @p As you can see, by default the @hl.scala{Parsed.Success} contains a @hl.scala{(): Unit}, unless you use @sect.ref{Capture} or From c645d477b6c5cfc702573e9b576a726eec00388f Mon Sep 17 00:00:00 2001 From: Luis Osa Date: Sat, 9 Aug 2025 19:11:12 +0200 Subject: [PATCH 2/2] Change indentation --- readme/WritingParsers.scalatex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme/WritingParsers.scalatex b/readme/WritingParsers.scalatex index 7fffeaa4..c1ef6c4d 100644 --- a/readme/WritingParsers.scalatex +++ b/readme/WritingParsers.scalatex @@ -13,7 +13,7 @@ Such a parser returns a @hl.scala{Parsed.Success} if the input matches the string, and otherwise returns a @hl.scala{Parsed.Failure}. @p - @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 _))}. + @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 _))}. @p As you can see, by default the @hl.scala{Parsed.Success} contains