[][src]Struct snekdown::parsing::parser::Parser

pub struct Parser { /* fields omitted */ }

Implementations

impl Parser[src]

pub fn new_from_file(path: String) -> Result<Self, Error>[src]

TODO fn get_until(until: &char, err_when: &[]) -> String

pub fn new(text: String, path: Option<String>) -> Self[src]

pub fn new_as_child(
    text: String,
    path: String,
    paths: Arc<Mutex<Vec<String>>>
) -> Self
[src]

pub fn parse(&mut self) -> Document[src]

parses the given text into a document

pub fn parse_block(&mut self) -> Result<Block, ParseError>[src]

Parses a block Token

pub fn parse_row(&mut self) -> Result<Row, ParseError>[src]

parses a table row/head

Trait Implementations

impl CharStateMachine for Parser[src]

fn next_char(&mut self) -> Option<char>[src]

Increments the current index and returns the char at the indexes position

fn skip_char(&mut self)[src]

skips to the next char

fn revert_to(&mut self, index: usize) -> Result<(), ParseError>[src]

Returns to an index position

fn revert_with_error(&mut self, index: usize) -> ParseError[src]

reverts and returns a parse error

fn seek_inline_whitespace(&mut self)[src]

Skips characters until it encounters a character that isn't an inline whitespace character

fn seek_whitespace(&mut self)[src]

Skips characters until it encounters a character that isn't a whitespace character

fn check_escaped(&self) -> bool[src]

checks if the input character is escaped

fn check_special(&self, character: &char) -> bool[src]

checks if the current character is the given input character and not escaped

fn check_special_group(&self, chars: &[char]) -> bool[src]

checks if the current character is part of the given group

fn check_special_sequence_group(&mut self, sequences: &[&[char]]) -> bool[src]

checks if the next chars are a special sequence

fn check_linebreak(&self) -> bool[src]

returns if the current character is a linebreak character Note: No one likes CRLF

fn check_seek_inline_whitespace(&mut self) -> bool[src]

seeks inline whitespaces and returns if there were seeked whitespaces

fn check_special_sequence(&mut self, sequence: &[char]) -> bool[src]

checks if the next characters match a special sequence

fn get_string_until(
    &mut self,
    break_at: &[char],
    err_at: &[char]
) -> Result<String, ParseError>
[src]

returns the string until a specific

fn get_string_until_sequence(
    &mut self,
    break_at: &[&[char]],
    err_at: &[char]
) -> Result<String, ParseError>
[src]

Returns the string until a specific end sequence or an error character

Auto Trait Implementations

impl !RefUnwindSafe for Parser

impl Send for Parser

impl Sync for Parser

impl Unpin for Parser

impl !UnwindSafe for Parser

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.