Skip to content

Commit

Permalink
fix: bad markAsToken application
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Jan 29, 2024
1 parent b0a5bd4 commit 8f5fd29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Revision history for gigaparsec

## 0.2.2.3 -- 2024-01-29
* Fixed bug where `markAsToken` doesn't apply at the correct offsets

## 0.2.2.2 -- 2024-01-29
* Optimised the error system using `DefuncError` and `DefuncHints`.
* Fixed bugs with amending and token merging.
Expand Down
2 changes: 1 addition & 1 deletion gigaparsec.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name: gigaparsec
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
version: 0.2.2.2
version: 0.2.2.3

-- A short (one-line) description of the package.
synopsis:
Expand Down
2 changes: 1 addition & 1 deletion src/Text/Gigaparsec/Internal/Errors/DefuncError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ dislodge by err@(DefuncError k flags pOff uOff errTy)
where !eBy = entrenchedBy err

markAsLexical :: Word -> DefuncError -> DefuncError
markAsLexical !off (DefuncError IsVanilla flags pOff uOff errTy) | off == pOff =
markAsLexical !off (DefuncError IsVanilla flags pOff uOff errTy) | off < pOff =
DefuncError IsVanilla (setBit flags lexicalBit) pOff uOff errTy
markAsLexical _ err = err

Expand Down

0 comments on commit 8f5fd29

Please sign in to comment.