mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Assign elsif blocks correctly.
This commit is contained in:
parent
e9a4f9e3a1
commit
69b0eeb18a
@ -71,7 +71,8 @@ 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 <$ rule Else <*> children (many statement)))
|
||||
if' = go If
|
||||
where go symbol = wrapU <$ rule symbol <*> children (Statement.If <$> statement <*> (wrapU <$> many statement) <*> (go Elsif <|> wrapU <$ rule Else <*> children (many statement)))
|
||||
|
||||
expr :: Assignment Grammar (Program a)
|
||||
expr = if' <|> literal
|
||||
|
Loading…
Reference in New Issue
Block a user