Struct ezno_parser::Module 
source · pub struct Module {
    pub items: Vec<StatementOrDeclaration>,
    pub source: SourceId,
    pub span: Span,
}Fields§
§items: Vec<StatementOrDeclaration>§source: SourceId§span: SpanImplementations§
source§impl Module
 
impl Module
pub fn to_string_with_source_map( &self, settings: &ToStringOptions, fs: &impl FileSystem ) -> (String, SourceMap)
pub fn length(&self, settings: &ToStringOptions) -> usize
pub fn from_file( path: impl AsRef<Path>, settings: ParseOptions, fs: &mut impl FileSystem ) -> Result<Self, FromFileError>
source§impl Module
 
impl Module
pub fn visit<TData>( &self, visitors: &mut (impl VisitorReceiver<TData> + ?Sized), data: &mut TData, settings: &VisitSettings )
pub fn visit_mut<TData>( &mut self, visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), data: &mut TData, settings: &VisitSettings )
Trait Implementations§
source§impl ASTNode for Module
 
impl ASTNode for Module
fn to_string_from_buffer<T: ToString>( &self, buf: &mut T, settings: &ToStringOptions, depth: u8 )
source§fn get_position(&self) -> &Span
 
fn get_position(&self) -> &Span
Returns position of node as span AS IT WAS PARSED. May be Span::NULL if AST was doesn’t match anything in source
fn from_reader( reader: &mut impl TokenReader<TSXToken, TokenStart>, state: &mut ParsingState, settings: &ParseOptions ) -> ParseResult<Self>
source§fn from_string(
    script: String,
    options: ParseOptions,
    source: SourceId,
    offset: Option<u32>
) -> ParseResult<Self>
 
fn from_string( script: String, options: ParseOptions, source: SourceId, offset: Option<u32> ) -> ParseResult<Self>
From string, with default impl to call abstract method from_reader
source§fn to_string(&self, settings: &ToStringOptions) -> String
 
fn to_string(&self, settings: &ToStringOptions) -> String
Returns structure as valid string
source§impl<'a> From<&'a mut Module> for BlockLikeMut<'a>
 
impl<'a> From<&'a mut Module> for BlockLikeMut<'a>
Auto Trait Implementations§
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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