1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Offset the ends of ranges too.

This commit is contained in:
Rob Rix 2015-12-04 10:26:15 -05:00
parent 618a43a00d
commit d4ea7a04cc

View File

@ -41,6 +41,6 @@ main = hspec $ do
where
info source category = Info (totalRange source) (Range 0 0) (Set.fromList [ category ])
unchanged source category = Annotated (info source category, info source category)
offsetInfo by (Info (Range start end) lineRange categories) = Info (Range (start + by) end) lineRange categories
offsetInfo by (Info (Range start end) lineRange categories) = Info (Range (start + by) (end + by)) lineRange categories
offsetAnnotated by (Annotated (left, right) syntax) = Annotated (offsetInfo by left, offsetInfo by right) syntax
span = Span (Just "leaf")