pub struct ParserRunner { /* private fields */ }

Implementations§

Examples found in repository?
parse.rs (line 201)
200
201
202
203
204
205
206
207
208
209
    fn exec(&mut self) -> Result<i32, Self::Errs> {
        let ast = self.parse(self.input().read())?;
        println!("{ast}");
        Ok(0)
    }

    fn eval(&mut self, src: String) -> Result<String, ParserRunnerErrors> {
        let ast = self.parse(src)?;
        Ok(format!("{ast}"))
    }
More examples
Hide additional examples
build_ast.rs (line 60)
59
60
61
62
63
64
65
    pub fn build(&mut self, src: String) -> Result<AST, ParserRunnerErrors> {
        let module = self.runner.parse(src)?;
        let mut desugarer = Desugarer::new();
        let module = desugarer.desugar(module);
        let ast = AST::new(Str::rc(self.runner.cfg().input.full_path()), module);
        Ok(ast)
    }

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Erase all but immutable information.
Erase information that will no longer be meaningful in the next iteration

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.