1
1
mirror of https://github.com/github/semantic.git synced 2025-01-09 00:56:32 +03:00

Map some array elements to key values

This commit is contained in:
joshvera 2018-01-18 12:39:48 -05:00
parent 88e7219a0e
commit d516bf3607

View File

@ -118,6 +118,7 @@ type Syntax = '[
, Statement.Pattern
, Statement.Match
, Syntax.LabeledStatement
, Literal.KeyValue
, [] ]
type Term = Term.Term (Data.Union.Union Syntax) (Record Location)
@ -670,9 +671,7 @@ yieldExpression :: Assignment
yieldExpression = makeTerm <$> symbol YieldExpression <*> children (Statement.Yield <$> (arrayElementInitializer <|> expression))
arrayElementInitializer :: Assignment
arrayElementInitializer = makeTerm <$> symbol ArrayElementInitializer <*> children (Syntax.ArrayElement <$> (expression
-- <|> KeyValue <$> expression <*> expression
))
arrayElementInitializer = makeTerm <$> symbol ArrayElementInitializer <*> children (Literal.KeyValue <$> expression <*> expression) <|> (symbol ArrayElementInitializer *> children expression)
includeExpression :: Assignment
includeExpression = makeTerm <$> symbol IncludeExpression <*> children (Syntax.Include <$> expression)