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)] =
|
def switchParser(state: State): Parser[(String, String)] =
|
||||||
{
|
{
|
||||||
val knownVersions = crossVersions(state)
|
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)
|
lazy val nextSpaced = spacedFirst(Switch)
|
||||||
token(Switch) flatMap { _ => switchArgs & nextSpaced }
|
token(Switch ~ OptSpace) flatMap { _ => switchArgs & nextSpaced }
|
||||||
}
|
}
|
||||||
def spacedFirst(name: String) = opOrIDSpaced(name) ~ any.+
|
def spacedFirst(name: String) = opOrIDSpaced(name) ~ any.+
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ trait Parsers
|
||||||
if(DefaultParsers.matches(ID, s))
|
if(DefaultParsers.matches(ID, s))
|
||||||
OpChar | SpaceClass
|
OpChar | SpaceClass
|
||||||
else if(DefaultParsers.matches(Op, s))
|
else if(DefaultParsers.matches(Op, s))
|
||||||
IDStart | SpaceClass
|
IDChar | SpaceClass
|
||||||
else
|
else
|
||||||
any
|
any
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue