mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Flip leaf’s argument order.
This commit is contained in:
parent
860138fe19
commit
620b1ebd49
@ -105,8 +105,8 @@ literal = term <*> (Literal.true <$ symbol Language.Ruby.Syntax.True <* source
|
|||||||
term :: InUnion Syntax' f => Assignment (Node grammar) (f (Term Syntax Location) -> Term Syntax Location)
|
term :: InUnion Syntax' f => Assignment (Node grammar) (f (Term Syntax Location) -> Term Syntax Location)
|
||||||
term = (\ a f -> cofree $ a :< inj f) <$> location
|
term = (\ a f -> cofree $ a :< inj f) <$> location
|
||||||
|
|
||||||
leaf :: (Enum symbol, Eq symbol, InUnion Syntax' f) => (ByteString -> f (Term Syntax Location)) -> symbol -> Assignment (Node symbol) (Term Syntax Location)
|
leaf :: (Enum symbol, Eq symbol, InUnion Syntax' f) => symbol -> (ByteString -> f (Term Syntax Location)) -> Assignment (Node symbol) (Term Syntax Location)
|
||||||
leaf f s = symbol s *> pure (\ a -> cofree . (a :<) . inj . f) <*> location <*> source
|
leaf s f = symbol s *> pure (\ a -> cofree . (a :<) . inj . f) <*> location <*> source
|
||||||
|
|
||||||
optional :: Assignment (Node Grammar) (Term Syntax Location) -> Assignment (Node Grammar) (Term Syntax Location)
|
optional :: Assignment (Node Grammar) (Term Syntax Location) -> Assignment (Node Grammar) (Term Syntax Location)
|
||||||
optional a = a <|> term <*> pure Syntax.Empty
|
optional a = a <|> term <*> pure Syntax.Empty
|
||||||
|
Loading…
Reference in New Issue
Block a user