mirror of
https://github.com/github/semantic.git
synced 2025-01-04 13:34:31 +03:00
Fix up typescript member expression assignment - revert qualified identifier business
This commit is contained in:
parent
42b6f7d347
commit
4e6fb7a6f1
@ -265,12 +265,7 @@ ternaryExpression :: Assignment
|
|||||||
ternaryExpression = makeTerm <$> symbol Grammar.TernaryExpression <*> children (Statement.If <$> term expression <*> term expression <*> term expression)
|
ternaryExpression = makeTerm <$> symbol Grammar.TernaryExpression <*> children (Statement.If <$> term expression <*> term expression <*> term expression)
|
||||||
|
|
||||||
memberExpression :: Assignment
|
memberExpression :: Assignment
|
||||||
memberExpression = (symbol Grammar.MemberExpression <|> symbol Grammar.MemberExpression') *> children (qualifiedIdentifier <|> memberAccess)
|
memberExpression = makeTerm <$> (symbol Grammar.MemberExpression <|> symbol Grammar.MemberExpression') <*> children (Expression.MemberAccess <$> term expression <*> term propertyIdentifier)
|
||||||
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
|
|
||||||
|
|
||||||
newExpression :: Assignment
|
newExpression :: Assignment
|
||||||
newExpression = makeTerm <$> symbol Grammar.NewExpression <*> children (Expression.New . pure <$> term expression)
|
newExpression = makeTerm <$> symbol Grammar.NewExpression <*> children (Expression.New . pure <$> term expression)
|
||||||
|
Loading…
Reference in New Issue
Block a user