mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Get all the fields uniformly.
This commit is contained in:
parent
a5a86b33ea
commit
17d413d267
@ -229,7 +229,7 @@ jsonParseTree' constructor combine debug SourceBlob{..} term = toJSON $ construc
|
||||
algebra (annotation :< syntax) = combine (makeNode annotation) (toList (Prologue.snd <$> syntax))
|
||||
|
||||
makeNode :: HasDefaultFields fields => Record (Maybe SourceText ': Maybe Text ': fields) -> ParseNode
|
||||
makeNode (sourceText :. record) = ParseNode (getField record) (getField record) sourceText (getField record) (getField record)
|
||||
makeNode record = ParseNode (getField record) (getField record) (getField record) (getField record) (getField record)
|
||||
|
||||
-- | Decorate a 'Term' using a function to compute the annotation values at every node.
|
||||
decorateTerm :: (Functor f, HasDefaultFields fields) => TermDecorator f fields field -> Term f (Record fields) -> Term f (Record (field ': fields))
|
||||
|
Loading…
Reference in New Issue
Block a user