From 0a935efc77976d78da20877d8dcb0f49bac972c5 Mon Sep 17 00:00:00 2001 From: joshvera Date: Fri, 27 Oct 2017 17:23:16 -0400 Subject: [PATCH] Ignore EnumBody in enumDeclaration --- src/Language/TypeScript/Assignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/TypeScript/Assignment.hs b/src/Language/TypeScript/Assignment.hs index 422924688..14e4ac0b1 100644 --- a/src/Language/TypeScript/Assignment.hs +++ b/src/Language/TypeScript/Assignment.hs @@ -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)