[−][src]Struct leo_ast::LeoAst
Implementations
impl<'ast> LeoAst<'ast>
[src]
pub fn new(
file_path: &'ast PathBuf,
program_string: &'ast str
) -> Result<Self, ParserError>
[src]
file_path: &'ast PathBuf,
program_string: &'ast str
) -> Result<Self, ParserError>
Creates a new abstract syntax tree given the file path.
pub fn load_file(file_path: &'ast PathBuf) -> Result<String, ParserError>
[src]
Loads the Leo code as a string from the given file path.
pub fn as_repr(&self) -> &File<'ast>
[src]
Returns a reference to the inner abstract syntax tree representation.
pub fn to_json_string(&self) -> Result<String, ParserError>
[src]
Serializes the abstract syntax tree into a JSON string.
Auto Trait Implementations
impl<'ast> RefUnwindSafe for LeoAst<'ast>
impl<'ast> Send for LeoAst<'ast>
impl<'ast> Sync for LeoAst<'ast>
impl<'ast> Unpin for LeoAst<'ast>
impl<'ast> UnwindSafe for LeoAst<'ast>
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>,