on master help sign in
Fix bug in computing row/col for keyword and symbol parsers
commit06e7d8ff3350a35e99bd74cac5c109f2c10b72ea authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 15 Dec 2017, 18:58 (9 years ago) parent3f20280
2 files changed+2−2
src/Parse/Primitives/Keyword.hs+1−1 src/Parse/Primitives/Symbol.hs+1−1
src/Parse/Primitives/Keyword.hs+1−1
@@ -43,7 +43,7 @@ keyword kwd@(B.PS kwdFp kwdOffset kwdLength) =
4343 then
4444 let
4545 !newState =
46− State fp (offset + kwdLength) terminal indent (row + kwdLength) col ctx
46+ State fp (offset + kwdLength) terminal indent row (col + kwdLength) ctx
4747 in
4848 cok () newState noError
4949
src/Parse/Primitives/Symbol.hs+1−1
@@ -125,7 +125,7 @@ symbol sym@(B.PS symFp symOffset symLength) =
125125 in
126126 Parser $ \(State fp offset terminal indent row col ctx) cok _ _ eerr ->
127127 if I.isSubstring symFp symOffset symLength fp offset terminal then
128− let !newState = State fp (offset + symLength) terminal indent (row + symLength) col ctx in
128+ let !newState = State fp (offset + symLength) terminal indent row (col + symLength) ctx in
129129 cok () newState noError
130130
131131 else