Merge pull request #256 from gren-lang/bugfix-include-last-line-of-sourcemaps
Some checks failed
Build / validate-code-formatting (push) Has been cancelled
Build / linux (push) Has been cancelled
Build / mac (push) Has been cancelled
Build / windows (push) Has been cancelled

Make sure to include last line of source mappings.
This commit is contained in:
Robin Heggelund Hansen 2024-08-07 14:04:35 +02:00 committed by GitHub
commit fae84eb807
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,7 @@ mappingMapUpdater toInsert maybeVal =
parseMappingsHelp :: Word16 -> Word16 -> Map Word16 [JS.Mapping] -> Mappings -> Mappings parseMappingsHelp :: Word16 -> Word16 -> Map Word16 [JS.Mapping] -> Mappings -> Mappings
parseMappingsHelp currentLine lastLine mappingMap acc = parseMappingsHelp currentLine lastLine mappingMap acc =
if currentLine >= lastLine if currentLine > lastLine
then acc then acc
else case Map.lookup currentLine mappingMap of else case Map.lookup currentLine mappingMap of
Nothing -> Nothing ->