mirror of
https://github.com/github/semantic.git
synced 2025-01-03 21:16:12 +03:00
Assign else blocks correctly.
This commit is contained in:
parent
ae6033e70b
commit
e9a4f9e3a1
@ -71,7 +71,7 @@ comment :: Assignment Grammar (Program a)
|
||||
comment = wrapU . Comment.Comment <$ rule Comment <*> content
|
||||
|
||||
if' :: Assignment Grammar (Program a)
|
||||
if' = wrapU <$ rule If <*> children (Statement.If <$> statement <*> (wrapU <$> many statement) <*> (wrapU <$> many statement))
|
||||
if' = wrapU <$ rule If <*> children (Statement.If <$> statement <*> (wrapU <$> many statement) <*> (wrapU <$ rule Else <*> children (many statement)))
|
||||
|
||||
expr :: Assignment Grammar (Program a)
|
||||
expr = if' <|> literal
|
||||
|
Loading…
Reference in New Issue
Block a user