Add missing =
required default values and unions
This commit is contained in:
parent
048ee552d8
commit
b206079047
@ -73,7 +73,10 @@ variableDefinition :: Parser VariableDefinition
|
|||||||
variableDefinition =
|
variableDefinition =
|
||||||
VariableDefinition <$> variable <* s <* ":" <* s
|
VariableDefinition <$> variable <* s <* ":" <* s
|
||||||
<*> type_ <* s
|
<*> type_ <* s
|
||||||
<*> value
|
<*> (defaultValue <|> empty)
|
||||||
|
|
||||||
|
defaultValue :: Parser DefaultValue
|
||||||
|
defaultValue = "=" *> s *> value
|
||||||
|
|
||||||
-- In defense of good taste, I'm taking liberty of not allowing space between
|
-- In defense of good taste, I'm taking liberty of not allowing space between
|
||||||
-- '$' and the 'name' even though that's not in the spec.
|
-- '$' and the 'name' even though that's not in the spec.
|
||||||
@ -248,6 +251,7 @@ unionTypeDefinition :: Parser UnionTypeDefinition
|
|||||||
unionTypeDefinition = UnionTypeDefinition
|
unionTypeDefinition = UnionTypeDefinition
|
||||||
<$ "union" <* s1
|
<$ "union" <* s1
|
||||||
<*> name <* s
|
<*> name <* s
|
||||||
|
<* "=" <* s
|
||||||
<*> unionMembers
|
<*> unionMembers
|
||||||
where
|
where
|
||||||
-- This should take care of standalone `NamedType`
|
-- This should take care of standalone `NamedType`
|
||||||
|
Loading…
Reference in New Issue
Block a user