Struct malk_lexer::TextPos [] [src]

pub struct TextPos {
    pub col: usize,
    pub line: usize,
    pub byte: usize,
}

A position in a text document.

Fields

The column number from the start of the line. Some wierd characters may take up multiple columns or no columns.

The line number

The byte position from the start of the document.

Methods

impl TextPos
[src]

Create a TextPos at the start of a document.

Advance a position by one character. Returns the character that was advanced past and the new position.

Trait Implementations

impl Debug for TextPos
[src]

Formats the value using the given formatter.

impl Clone for TextPos
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for TextPos
[src]

impl PartialEq for TextPos
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.