mirror of
https://github.com/sbt/sbt.git
synced 2026-08-22 14:17:13 +02:00
make Uri parser fail (instead of error) on malformed inputs
This commit is contained in:
@@ -48,7 +48,7 @@ trait Parsers
|
|||||||
def spaceDelimited(display: String): Parser[Seq[String]] = (token(Space) ~> token(NotSpace, display)).* <~ SpaceClass.*
|
def spaceDelimited(display: String): Parser[Seq[String]] = (token(Space) ~> token(NotSpace, display)).* <~ SpaceClass.*
|
||||||
|
|
||||||
def trimmed(p: Parser[String]) = p map { _.trim }
|
def trimmed(p: Parser[String]) = p map { _.trim }
|
||||||
def Uri(ex: Set[URI]) = NotSpace map { uri => new URI(uri) } examples(ex.map(_.toString))
|
def Uri(ex: Set[URI]) = mapOrFail(NotSpace)( uri => new URI(uri)) examples(ex.map(_.toString))
|
||||||
}
|
}
|
||||||
object Parsers extends Parsers
|
object Parsers extends Parsers
|
||||||
object DefaultParsers extends Parsers with ParserMain
|
object DefaultParsers extends Parsers with ParserMain
|
||||||
Reference in New Issue
Block a user