1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Construct leaves with subsources.

This commit is contained in:
Rob Rix 2015-12-23 22:27:42 -05:00
parent 7b6bc623c9
commit 5e8e9bda5f

View File

@ -109,7 +109,7 @@ spec = do
combineIntoLeaves (leaves, start) char = (leaves ++ [ Free $ Annotated (Info (Range start $ start + 1) mempty, Info (Range start $ start + 1) mempty) (Leaf [ char ]) ], start + 1)
leafWithRangesInSources sourceA sourceB rangeA rangeB = Free $ Annotated (Info rangeA mempty, Info rangeB mempty) (Leaf $ substring rangeA sourceA ++ substring rangeB sourceB)
leafWithRangesInSources sourceA sourceB rangeA rangeB = Free $ Annotated (Info rangeA mempty, Info rangeB mempty) (Leaf $ subsource rangeA sourceA ++ subsource rangeB sourceB)
openMaybe :: Maybe Bool -> Maybe (Maybe Bool)
openMaybe (Just a) = Just (Just a)