1
1
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:
Rob Rix 2017-04-19 10:13:05 -04:00
parent ae6033e70b
commit e9a4f9e3a1

View File

@ -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