Position¶
Converts byte offsets in source text to line/column positions. Used by
PegFormatError to produce human-readable error locations.
Constructors¶
create¶
Returns¶
- Position val^
Public Functions¶
apply¶
Return the (line, column) for a byte offset in source.
Parameters¶
Returns¶
text¶
Return the source line containing the given offset.
Parameters¶
Returns¶
- String val
indent¶
Build a whitespace string matching the indentation up to col.
Parameters¶
Returns¶
- String val
eq¶
Parameters¶
- that: Position val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Position val
Returns¶
- Bool val