Skip to content

Conversation

xuwei-k
Copy link
Member

@xuwei-k xuwei-k commented Jul 8, 2022

@xuwei-k xuwei-k changed the title Update 04-Parsing-Input.md fix 04-Parsing-Input.md compile error Jul 8, 2022
// A parser that succeeds if the input is "blue" or "green",
// returning the matched input
val color: Parser[String] = "blue" | "green"
val color: Parser[String] = literal("blue") | "green"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't literal the name of implicit converter? Is there a conflict that's preventing from this to be not called implicitly?
https://github.com/sbt/sbt/blob/8aae00fb42d8d354cba226d1244a197df671a35c/internal/util-complete/src/main/scala/sbt/internal/util/complete/Parser.scala#L424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error with "|" in the documentation Error with parser type in the documentation

2 participants