1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

An object can contain a shorthand property identifier

This commit is contained in:
joshvera 2017-08-21 19:05:07 -04:00
parent acad9e9222
commit b5403f051c

View File

@ -560,7 +560,7 @@ class' = makeClass <$> symbol Class <*> children ((,,,) <$> expression <*> (many
makeClass loc (expression, typeParams, superclass', statements) = makeTerm loc (Declaration.Class typeParams expression superclass' statements)
object :: Assignment
object = makeTerm <$> symbol Object <*> children (Literal.Hash <$> many (pair <|> spreadElement <|> methodDefinition <|> assignmentPattern <|> shorthandReservedIdentifier))
object = makeTerm <$> symbol Object <*> children (Literal.Hash <$> many (pair <|> spreadElement <|> methodDefinition <|> assignmentPattern <|> shorthandPropertyIdentifier))
array :: Assignment
array = makeTerm <$> symbol Array <*> children (Literal.Array <$> many (expression <|> spreadElement))