Struct erg_parser::build_ast::ASTBuilder
source · pub struct ASTBuilder { /* private fields */ }
Expand description
Summarize parsing and desugaring
Implementations§
source§impl ASTBuilder
impl ASTBuilder
pub fn new(cfg: ErgConfig) -> Self
pub fn build( &mut self, src: String ) -> Result<CompleteArtifact<AST, ParserRunnerErrors>, IncompleteArtifact<AST, ParserRunnerErrors>>
pub fn build_without_desugaring( &mut self, src: String ) -> Result<CompleteArtifact<AST, ParserRunnerErrors>, IncompleteArtifact<AST, ParserRunnerErrors>>
Trait Implementations§
source§impl ASTBuildable for ASTBuilder
impl ASTBuildable for ASTBuilder
fn build_ast( &mut self, src: String ) -> Result<CompleteArtifact<AST, ParserRunnerErrors>, IncompleteArtifact<AST, ParserRunnerErrors>>
source§impl Debug for ASTBuilder
impl Debug for ASTBuilder
source§impl Default for ASTBuilder
impl Default for ASTBuilder
source§fn default() -> ASTBuilder
fn default() -> ASTBuilder
Returns the “default value” for a type. Read more
source§impl Runnable for ASTBuilder
impl Runnable for ASTBuilder
type Err = ParserRunnerError
type Errs = ParserRunnerErrors
const NAME: &'static str = "Erg AST builder"
fn cfg(&self) -> &ErgConfig
fn cfg_mut(&mut self) -> &mut ErgConfig
fn finish(&mut self)
source§fn initialize(&mut self)
fn initialize(&mut self)
Erase all but immutable information.
fn exec(&mut self) -> Result<ExitStatus, Self::Errs>
fn eval(&mut self, src: String) -> Result<String, ParserRunnerErrors>
fn expect_block(&self, src: &str) -> BlockKind
fn input(&self) -> &Input
fn set_input(&mut self, input: Input)
fn start_message(&self) -> String
fn ps1(&self) -> String
fn ps2(&self) -> String
fn quit(&mut self, code: i32) -> !
fn quit_successfully(&mut self, output: BufWriter<StdoutLock<'_>>) -> !
fn run(cfg: ErgConfig) -> ExitStatus
Auto Trait Implementations§
impl Freeze for ASTBuilder
impl RefUnwindSafe for ASTBuilder
impl Send for ASTBuilder
impl Sync for ASTBuilder
impl Unpin for ASTBuilder
impl UnwindSafe for ASTBuilder
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