mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
Contextualize within pairs.
This commit is contained in:
parent
5fc327ba32
commit
48d9a9d247
@ -13,7 +13,7 @@ import Data.Functor.Classes.Eq.Generic
|
||||
import Data.Functor.Classes.Show.Generic
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Record
|
||||
import Data.Syntax (emptyTerm, handleError, makeTerm)
|
||||
import Data.Syntax (contextualize, emptyTerm, handleError, makeTerm)
|
||||
import qualified Data.Syntax as Syntax
|
||||
import Data.Syntax.Assignment hiding (Assignment, Error)
|
||||
import qualified Data.Syntax.Assignment as Assignment
|
||||
@ -357,7 +357,7 @@ dictionary :: Assignment
|
||||
dictionary = makeTerm <$> symbol Dictionary <*> children (Literal.Hash <$> many expression)
|
||||
|
||||
pair :: Assignment
|
||||
pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$ many comment <*> expression <* many comment <*> expression <* many comment)
|
||||
pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$> contextualize comment expression <*> contextualize comment expression <* many comment)
|
||||
|
||||
list' :: Assignment
|
||||
list' = makeTerm <$> symbol List <*> children (Literal.Array <$> many expression)
|
||||
|
Loading…
Reference in New Issue
Block a user