pub struct ParserConfig { /* private fields */ }
Expand description
The configuration of the parser.
Implementations§
Source§impl ParserConfig
impl ParserConfig
Sourcepub fn from_path(path_to_spec: PathBuf) -> Result<ParserConfig, Error>
pub fn from_path(path_to_spec: PathBuf) -> Result<ParserConfig, Error>
Reads the specification from the given path and creates a new parser configuration for it.
Sourcepub fn for_string(spec: String) -> ParserConfig
pub fn for_string(spec: String) -> ParserConfig
Creates a new parser configuration for the given specification.
Sourcepub fn for_named_spec(name: String, spec: String) -> ParserConfig
pub fn for_named_spec(name: String, spec: String) -> ParserConfig
Creates a new parser configuration for the given specification using the name as file name.
Sourcepub fn parse(&self) -> Result<RtLolaAst, RtLolaError>
pub fn parse(&self) -> Result<RtLolaAst, RtLolaError>
Invokes the parser on the specification given in the configuration.
Trait Implementations§
Source§impl Clone for ParserConfig
impl Clone for ParserConfig
Source§fn clone(&self) -> ParserConfig
fn clone(&self) -> ParserConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ParserConfig
impl Debug for ParserConfig
Source§impl<'a> From<&'a ParserConfig> for FrontendConfig<'a>
impl<'a> From<&'a ParserConfig> for FrontendConfig<'a>
Source§fn from(parser_config: &'a ParserConfig) -> FrontendConfig<'a>
fn from(parser_config: &'a ParserConfig) -> FrontendConfig<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a ParserConfig> for Handler<'a>
impl<'a> From<&'a ParserConfig> for Handler<'a>
Source§fn from(cfg: &'a ParserConfig) -> Handler<'a>
fn from(cfg: &'a ParserConfig) -> Handler<'a>
Converts to this type from the input type.
Source§impl<'a> ParserConfigExt<'a> for ParserConfig
impl<'a> ParserConfigExt<'a> for ParserConfig
Source§fn with_memory_bound_mode(
&'a self,
memory_bound_mode: MemoryBoundMode,
) -> FrontendConfig<'a>
fn with_memory_bound_mode( &'a self, memory_bound_mode: MemoryBoundMode, ) -> FrontendConfig<'a>
Specifies whether to compute the memory bound in dynamic or static way.
Source§fn parser_config(&self) -> &ParserConfig
fn parser_config(&self) -> &ParserConfig
Returns a reference to the underlying parser config.
Auto Trait Implementations§
impl Freeze for ParserConfig
impl RefUnwindSafe for ParserConfig
impl Send for ParserConfig
impl Sync for ParserConfig
impl Unpin for ParserConfig
impl UnwindSafe for ParserConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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