Skip to content
Browse files

allow task axis to be specified when the setting has no instances wit…

…h it specified. fixes #121
  • Loading branch information...
1 parent d4c76b0 commit a1dc17b2c60441392f868e4d68f5878ca3dcd51a @harrah committed Jul 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 main/Act.scala
View
4 main/Act.scala
@@ -72,15 +72,15 @@ object Act
def taskExtrasParser(tasks: Set[AttributeKey[_]], knownKeys: Map[String, AttributeKey[_]], knownValues: IMap[AttributeKey, Set]): Parser[(ScopeAxis[AttributeKey[_]], ScopeAxis[AttributeMap])] =
{
val extras = extrasParser(knownKeys, knownValues)
- val taskParser = if(tasks.isEmpty) success(Global) else optionalAxis(taskAxisParser(tasks, knownKeys), Global)
+ val taskParser = optionalAxis(taskAxisParser(tasks, knownKeys), Global)
val taskAndExtra =
taskParser flatMap { taskAxis =>
if(taskAxis.isSelect)
optionalAxis(spacedComma ~> extras, Global) map { x => (taskAxis, x) }
else
extras map { x => (taskAxis, Select(x)) }
}
- val base = token('(') ~> taskAndExtra <~ token(')')
+ val base = token('(', hide = tasks.isEmpty) ~> taskAndExtra <~ token(')')
base ?? ( (Global, Global) )
}

0 comments on commit a1dc17b

Please sign in to comment.
Something went wrong with that request. Please try again.