pub struct LuaParser<'a> {
pub parse_config: ParserConfig<'a>,
/* private fields */
}Fields§
§parse_config: ParserConfig<'a>Implementations§
Source§impl<'a> LuaParser<'a>
impl<'a> LuaParser<'a>
pub fn parse(text: &'a str, config: ParserConfig<'_>) -> LuaSyntaxTree
pub fn init(&mut self)
pub fn origin_text(&self) -> &'a str
pub fn current_token(&self) -> LuaTokenKind
pub fn current_token_index(&self) -> usize
pub fn current_token_range(&self) -> SourceRange
pub fn previous_token_range(&self) -> SourceRange
pub fn current_token_text(&self) -> &str
pub fn set_current_token_kind(&mut self, kind: LuaTokenKind)
pub fn bump(&mut self)
pub fn peek_next_token(&self) -> LuaTokenKind
pub fn push_error(&mut self, err: LuaParseError)
pub fn has_error(&self) -> bool
pub fn get_errors(&self) -> Vec<LuaParseError>
Auto Trait Implementations§
impl<'a> Freeze for LuaParser<'a>
impl<'a> RefUnwindSafe for LuaParser<'a>
impl<'a> Send for LuaParser<'a>
impl<'a> Sync for LuaParser<'a>
impl<'a> Unpin for LuaParser<'a>
impl<'a> !UnwindSafe for LuaParser<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more