Copyright | (c) comp 2020 |
---|---|
License | MIT |
Maintainer | onecomputer00@gmail.com |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Data type for source position.
Positional data
The position of a token within the source text.
initialPos :: FilePath -> Pos Source #
Creates a Pos
for the start of a source text (line 1, column 1) with a given file path.
Updates position based on a character-like token.
Tokens which are considered newlines will increment the line number by 1 and set the column number to 1. Otherwise, the column number is incremented by one.