forked from OSS/graphql
Add errors for all parser Alternative
s
This commit is contained in:
parent
899fa1b531
commit
88ca3d1866
@ -163,6 +163,7 @@ value = ValueVariable <$> variable
|
|||||||
<|> ValueEnum <$> name
|
<|> ValueEnum <$> name
|
||||||
<|> ValueList <$> listValue
|
<|> ValueList <$> listValue
|
||||||
<|> ValueObject <$> objectValue
|
<|> ValueObject <$> objectValue
|
||||||
|
<?> "value error!"
|
||||||
|
|
||||||
|
|
||||||
stringValue :: Parser StringValue
|
stringValue :: Parser StringValue
|
||||||
@ -207,6 +208,7 @@ type_ :: Parser Type
|
|||||||
type_ = TypeNamed <$> namedType
|
type_ = TypeNamed <$> namedType
|
||||||
<|> TypeList <$> listType
|
<|> TypeList <$> listType
|
||||||
<|> TypeNonNull <$> nonNullType
|
<|> TypeNonNull <$> nonNullType
|
||||||
|
<?> "type_ error!"
|
||||||
|
|
||||||
namedType :: Parser NamedType
|
namedType :: Parser NamedType
|
||||||
namedType = NamedType <$> name
|
namedType = NamedType <$> name
|
||||||
@ -217,6 +219,7 @@ listType = ListType <$> brackets type_
|
|||||||
nonNullType :: Parser NonNullType
|
nonNullType :: Parser NonNullType
|
||||||
nonNullType = NonNullTypeNamed <$> namedType <* tok "!"
|
nonNullType = NonNullTypeNamed <$> namedType <* tok "!"
|
||||||
<|> NonNullTypeList <$> listType <* tok "!"
|
<|> NonNullTypeList <$> listType <* tok "!"
|
||||||
|
<?> "nonNullType error!"
|
||||||
|
|
||||||
-- * Type Definition
|
-- * Type Definition
|
||||||
|
|
||||||
@ -237,7 +240,6 @@ objectTypeDefinition = ObjectTypeDefinition
|
|||||||
<*> name
|
<*> name
|
||||||
<*> optempty interfaces
|
<*> optempty interfaces
|
||||||
<*> fieldDefinitions
|
<*> fieldDefinitions
|
||||||
<?> "objectTypeDefinition error!"
|
|
||||||
|
|
||||||
interfaces :: Parser Interfaces
|
interfaces :: Parser Interfaces
|
||||||
interfaces = tok "implements" *> many1 namedType
|
interfaces = tok "implements" *> many1 namedType
|
||||||
|
Loading…
Reference in New Issue
Block a user