[−][src]Struct snekdown::parsing::parser::Parser
Implementations
impl Parser
[src]
pub fn new_from_file(path: String) -> Result<Self, Error>
[src]
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]
text: String,
path: String,
paths: Arc<Mutex<Vec<String>>>
) -> Self
pub fn get_paths(&self) -> Vec<String>
[src]
Returns the import paths of the parser
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 seek_until_linebreak(&mut self)
[src]
seeks until it encounters a linebreak character
fn check_seek_inline_whitespace(&mut self) -> bool
[src]
seeks inline whitespaces and returns if there were seeked whitespaces
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(&mut self, sequence: &[char]) -> bool
[src]
checks if the next characters match a special sequence
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_eof(&self) -> bool
[src]
fn assert_special(
&mut self,
character: &char,
revert_index: usize
) -> Result<(), ParseError>
[src]
&mut self,
character: &char,
revert_index: usize
) -> Result<(), ParseError>
fn assert_special_group(
&mut self,
group: &[char],
revert_index: usize
) -> Result<(), ParseError>
[src]
&mut self,
group: &[char],
revert_index: usize
) -> Result<(), ParseError>
fn assert_special_sequence(
&mut self,
sequence: &[char],
revert_index: usize
) -> Result<(), ParseError>
[src]
&mut self,
sequence: &[char],
revert_index: usize
) -> Result<(), ParseError>
fn assert_special_sequence_group(
&mut self,
sequences: &[&[char]],
revert_index: usize
) -> Result<(), ParseError>
[src]
&mut self,
sequences: &[&[char]],
revert_index: usize
) -> Result<(), ParseError>
fn get_string_until(
&mut self,
break_at: &[char],
err_at: &[char]
) -> Result<String, ParseError>
[src]
&mut self,
break_at: &[char],
err_at: &[char]
) -> Result<String, ParseError>
returns the string until a specific
fn get_string_until_sequence(
&mut self,
break_at: &[&[char]],
err_at: &[char]
) -> Result<String, ParseError>
[src]
&mut self,
break_at: &[&[char]],
err_at: &[char]
) -> Result<String, ParseError>
Returns the string until a specific end sequence or an error character
fn get_string_until_or_revert(
&mut self,
break_at: &[char],
err_at: &[char],
revert_index: usize
) -> Result<String, ParseError>
[src]
&mut self,
break_at: &[char],
err_at: &[char],
revert_index: usize
) -> Result<String, ParseError>
returns the string until a specific character or reverts back to the given position
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,