From 4e6fb7a6f1dede11a9791faffc125dcd46a9017f Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Tue, 27 Mar 2018 10:20:10 -0700 Subject: [PATCH] Fix up typescript member expression assignment - revert qualified identifier business --- src/Language/TypeScript/Assignment.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Language/TypeScript/Assignment.hs b/src/Language/TypeScript/Assignment.hs index 5758c7d9f..0b1872370 100644 --- a/src/Language/TypeScript/Assignment.hs +++ b/src/Language/TypeScript/Assignment.hs @@ -265,12 +265,7 @@ ternaryExpression :: Assignment ternaryExpression = makeTerm <$> symbol Grammar.TernaryExpression <*> children (Statement.If <$> term expression <*> term expression <*> term expression) memberExpression :: Assignment -memberExpression = (symbol Grammar.MemberExpression <|> symbol Grammar.MemberExpression') *> children (qualifiedIdentifier <|> memberAccess) - where - memberAccess = makeTerm <$> location <*> (Expression.MemberAccess <$> term expression <*> term propertyIdentifier) - qualifiedIdentifier = makeTerm <$> location <*> ((\a b -> Syntax.Identifier (qualifiedName [a, b])) <$> identifier' <*> propertyIdentifier') - identifier' = (symbol Identifier <|> symbol Identifier') *> source - propertyIdentifier' = symbol PropertyIdentifier *> source +memberExpression = makeTerm <$> (symbol Grammar.MemberExpression <|> symbol Grammar.MemberExpression') <*> children (Expression.MemberAccess <$> term expression <*> term propertyIdentifier) newExpression :: Assignment newExpression = makeTerm <$> symbol Grammar.NewExpression <*> children (Expression.New . pure <$> term expression)