mirror of https://github.com/sbt/sbt.git
fix ++ command to not require a space after it
This commit is contained in:
parent
90f25b234e
commit
18b57bb101
|
|
@ -17,9 +17,9 @@ object Cross
|
|||
def switchParser(state: State): Parser[(String, String)] =
|
||||
{
|
||||
val knownVersions = crossVersions(state)
|
||||
lazy val switchArgs = token(OptSpace ~> NotSpace.examples(knownVersions : _*)) ~ (token(Space ~> matched(state.combinedParser)) ?? "")
|
||||
lazy val switchArgs = token(NotSpace.examples(knownVersions : _*)) ~ (token(Space ~> matched(state.combinedParser)) ?? "")
|
||||
lazy val nextSpaced = spacedFirst(Switch)
|
||||
token(Switch) flatMap { _ => switchArgs & nextSpaced }
|
||||
token(Switch ~ OptSpace) flatMap { _ => switchArgs & nextSpaced }
|
||||
}
|
||||
def spacedFirst(name: String) = opOrIDSpaced(name) ~ any.+
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ trait Parsers
|
|||
if(DefaultParsers.matches(ID, s))
|
||||
OpChar | SpaceClass
|
||||
else if(DefaultParsers.matches(Op, s))
|
||||
IDStart | SpaceClass
|
||||
IDChar | SpaceClass
|
||||
else
|
||||
any
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue