1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Not all break statements have labels

This commit is contained in:
Rick Winfrey 2017-10-30 17:50:39 -07:00
parent 328e6f69cf
commit dbb454eb08

View File

@ -423,7 +423,7 @@ shortVarDeclaration :: Assignment
shortVarDeclaration = makeTerm <$> symbol ShortVarDeclaration <*> children (Statement.Assignment <$> pure [] <*> expression <*> expression) shortVarDeclaration = makeTerm <$> symbol ShortVarDeclaration <*> children (Statement.Assignment <$> pure [] <*> expression <*> expression)
breakStatement :: Assignment breakStatement :: Assignment
breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> labelName) breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> (labelName <|> emptyTerm))
decStatement :: Assignment decStatement :: Assignment
decStatement = makeTerm <$> symbol DecStatement <*> children (Statement.PostDecrement <$> expression) decStatement = makeTerm <$> symbol DecStatement <*> children (Statement.PostDecrement <$> expression)