mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Rename setCharacterRange -> setByteRange.
This commit is contained in:
parent
d9b6c51319
commit
ccf92f9808
@ -61,7 +61,7 @@ alignSyntax toJoinThese toNode getRange sources (infos :< syntax) =
|
||||
where bothRanges = modifyJoin (fromThese [] []) lineRanges
|
||||
lineRanges = toJoinThese $ actualLineRanges . byteRange <$> infos <*> sources
|
||||
wrapInBranch = applyThese $ toJoinThese (makeNode <$> infos)
|
||||
makeNode info (range, children) = toNode (setCharacterRange info range :< children)
|
||||
makeNode info (range, children) = toNode (setByteRange info range :< children)
|
||||
|
||||
-- | Given a function to get the range, a list of already-aligned children, and the lists of ranges spanned by a branch, return the aligned lines.
|
||||
alignBranch :: (term -> Range) -> [Join These term] -> Both [Range] -> [Join These (Range, [term])]
|
||||
|
@ -4,7 +4,7 @@ module Info
|
||||
, HasDefaultFields
|
||||
, Range(..)
|
||||
, byteRange
|
||||
, setCharacterRange
|
||||
, setByteRange
|
||||
, Category(..)
|
||||
, category
|
||||
, setCategory
|
||||
@ -36,8 +36,8 @@ newtype SourceText = SourceText { unText :: Text }
|
||||
byteRange :: HasField fields Range => Record fields -> Range
|
||||
byteRange = getField
|
||||
|
||||
setCharacterRange :: HasField fields Range => Record fields -> Range -> Record fields
|
||||
setCharacterRange = setField
|
||||
setByteRange :: HasField fields Range => Record fields -> Range -> Record fields
|
||||
setByteRange = setField
|
||||
|
||||
category :: HasField fields Category => Record fields -> Category
|
||||
category = getField
|
||||
|
Loading…
Reference in New Issue
Block a user