From 09f735b2b7177f0dbfb001db9f8b0f1ab6960fac Mon Sep 17 00:00:00 2001 From: Ayman Nadeem Date: Tue, 21 Aug 2018 17:47:45 -0400 Subject: [PATCH] add typescript assignment for complement operator --- src/Language/TypeScript/Assignment.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Language/TypeScript/Assignment.hs b/src/Language/TypeScript/Assignment.hs index 699830e96..2b40e195b 100644 --- a/src/Language/TypeScript/Assignment.hs +++ b/src/Language/TypeScript/Assignment.hs @@ -295,7 +295,8 @@ awaitExpression = makeTerm <$> symbol Grammar.AwaitExpression <*> children (Expr unaryExpression :: Assignment Term unaryExpression = symbol Grammar.UnaryExpression >>= \ loc -> - makeTerm loc . Expression.Not <$> children ((symbol AnonTilde <|> symbol AnonBang) *> term expression) + makeTerm loc . Expression.Not <$> children (symbol AnonBang *> term expression) + <|> makeTerm loc . Expression.Complement <$> children (symbol AnonTilde *> term expression) <|> makeTerm loc . Expression.Negate <$> children ((symbol AnonMinus <|> symbol AnonPlus) *> term expression) <|> makeTerm loc . Expression.Typeof <$> children (symbol AnonTypeof *> term expression) <|> makeTerm loc . Expression.Void <$> children (symbol AnonVoid *> term expression)