1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Ignore EnumBody in enumDeclaration

This commit is contained in:
joshvera 2017-10-27 17:23:16 -04:00
parent cd4612c512
commit 0a935efc77

View File

@ -611,7 +611,7 @@ typeAliasDeclaration = makeTypeAliasDecl <$> symbol Grammar.TypeAliasDeclaration
where makeTypeAliasDecl loc (identifier, typeParams, body) = makeTerm loc (Declaration.TypeAliasDeclaration [typeParams] identifier body)
enumDeclaration :: Assignment
enumDeclaration = makeTerm <$> symbol Grammar.EnumDeclaration <*> children (TypeScript.Syntax.EnumDeclaration <$> term identifier <*> manyTerm (propertyName <|> enumAssignment))
enumDeclaration = makeTerm <$> symbol Grammar.EnumDeclaration <*> children (TypeScript.Syntax.EnumDeclaration <$> term identifier <*> (symbol EnumBody *> children (manyTerm (propertyName <|> enumAssignment))))
enumAssignment :: Assignment
enumAssignment = makeTerm <$> symbol Grammar.EnumAssignment <*> children (Statement.Assignment [] <$> term propertyName <*> term expression)