1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 05:11:44 +03:00

Assign key-value pairs as infix terms.

This commit is contained in:
Rob Rix 2017-08-14 19:09:55 -04:00
parent 2e4c88632c
commit 3d0bc0e926

View File

@ -353,7 +353,7 @@ dictionary :: Assignment
dictionary = makeTerm <$> symbol Dictionary <*> children (Literal.Hash <$> many expression)
pair :: Assignment
pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$> expression <*> expression)
pair = makeTerm' <$> symbol Pair <*> children (infixTerm expression expression [ (inj .) . Literal.KeyValue <$ symbol AnonColon ])
list' :: Assignment
list' = makeTerm <$> symbol List <*> children (Literal.Array <$> many expression)