mirror of https://github.com/sbt/sbt.git
cleanup and fixes
This commit is contained in:
parent
5f9c6f7f26
commit
ba9c2c0e14
|
|
@ -45,8 +45,9 @@ trait Parsers
|
|||
def mapOrFail[S,T](p: Parser[S])(f: S => T): Parser[T] =
|
||||
p flatMap { s => try { success(f(s)) } catch { case e: Exception => failure(e.toString) } }
|
||||
|
||||
def spaceDelimited(display: String): Parser[Seq[String]] = (token(Space) ~> token(NotSpace, display)).*
|
||||
def spaceDelimited(display: String): Parser[Seq[String]] = (token(Space) ~> token(NotSpace, display)).* <~ SpaceClass.*
|
||||
|
||||
def trimmed(p: Parser[String]) = p map { _.trim }
|
||||
def Uri(ex: Set[URI]) = NotSpace map { uri => new URI(uri) } examples(ex.map(_.toString))
|
||||
}
|
||||
object Parsers extends Parsers
|
||||
|
|
|
|||
Loading…
Reference in New Issue