mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
🔥 the >>=!
This commit is contained in:
parent
10a0efcf0b
commit
934cb445b0
@ -179,9 +179,9 @@ parameter = makeTerm <$> symbol DefaultParameter <*> children (Statement.Assign
|
||||
<|> makeTerm <$> symbol ListSplatParameter <*> (Syntax.Identifier <$> source)
|
||||
<|> makeTerm <$> symbol DictionarySplatParameter <*> (Syntax.Identifier <$> source)
|
||||
<|> makeTerm <$> symbol TypedParameter <*> children (Type.Annotation <$> identifier <*> type')
|
||||
<|> (symbol TypedDefaultParameter >>= \ loc -> children (makeAnnotation loc <$> expression <*> expression <*> expression))
|
||||
<|> makeAnnotation <$> symbol TypedDefaultParameter <*> children ((,,) <$> expression <*> expression <*> expression)
|
||||
where
|
||||
makeAnnotation loc identifier' type' value' = makeTerm loc (Type.Annotation (makeAssignment loc identifier' value') type')
|
||||
makeAnnotation loc (identifier', type', value') = makeTerm loc (Type.Annotation (makeAssignment loc identifier' value') type')
|
||||
makeAssignment loc identifier' value' = makeTerm loc (Statement.Assignment identifier' value')
|
||||
|
||||
decoratedDefinition :: Assignment
|
||||
|
Loading…
Reference in New Issue
Block a user