1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 18:36:27 +03:00

Remove binary expressions that don't exist in typescript

This commit is contained in:
joshvera 2017-08-21 19:06:20 -04:00
parent 9b8b46d13a
commit 9d760d555a

View File

@ -916,10 +916,6 @@ binary = symbol BinaryExpression >>= \ loc -> children $ expression >>= \ lexpre
<|> mkNot AnonBangEqual Expression.Equal <|> mkNot AnonBangEqual Expression.Equal
-- TODO: Distinguish `===` from `==` ? -- TODO: Distinguish `===` from `==` ?
<|> mk AnonEqualEqualEqual Expression.Equal <|> mk AnonEqualEqualEqual Expression.Equal
<|> mk AnonLAngleEqualRAngle Expression.Comparison
-- TODO: Distinuish `=~` and `!~` ?
<|> mk AnonEqualTilde Expression.Equal
<|> mkNot AnonBangTilde Expression.Equal
<|> mk AnonLAngle Expression.LessThan <|> mk AnonLAngle Expression.LessThan
<|> mk AnonLAngleEqual Expression.LessThanEqual <|> mk AnonLAngleEqual Expression.LessThanEqual
<|> mk AnonRAngle Expression.GreaterThan <|> mk AnonRAngle Expression.GreaterThan
@ -933,7 +929,6 @@ binary = symbol BinaryExpression >>= \ loc -> children $ expression >>= \ lexpre
-- TODO: binary star (hidden node) -- TODO: binary star (hidden node)
<|> mk AnonSlash Expression.DividedBy <|> mk AnonSlash Expression.DividedBy
<|> mk AnonPercent Expression.Modulo <|> mk AnonPercent Expression.Modulo
<|> mk AnonStarStar Expression.Power
where mk s constr = makeTerm loc <$> (symbol s *> (constr lexpression <$> expression)) where mk s constr = makeTerm loc <$> (symbol s *> (constr lexpression <$> expression))
mkNot s constr = makeTerm loc <$ symbol s <*> (Expression.Not <$> (makeTerm <$> location <*> (constr lexpression <$> expression))) mkNot s constr = makeTerm loc <$ symbol s <*> (Expression.Not <$> (makeTerm <$> location <*> (constr lexpression <$> expression)))