fn eval_slide_program(mut self) -> SlideResult {
        let ParseResult {
            program,
            diagnostics,
        } = parse_statements(self.tokens, &self.result.org_program);

        self.result.err(&diagnostics);
        if !diagnostics.is_empty() {
            return self.result.failed();
        }

        let program_context = ProgramContext::default().lint(self.lint);
        if self.lint {
            self.result
                .err(&lint_stmt(&program, self.result.org_program));
        }

        if self.parse_only {
            self.result.emit(&program);

            self.result.ok()
        } else {
            let EvaluationResult {
                simplified,
                diagnostics,
            } = evaluate(program, &program_context).unwrap();
            let fatal = diagnostics.iter().any(|d| d.kind == DiagnosticKind::Error);

            self.result.err(&diagnostics);
            if !fatal {
                self.result.emit(&simplified);
            }

            if diagnostics.is_empty() {
                self.result.ok()
            } else {
                self.result.failed()
            }
        }
    }
/// Handles evaluation of a regular slide program (statements, expressions).
Handles evaluation of a regular slide program (statements, expressions).
Handles evaluation of a regular slide program ( statements expressions ) .
fn eval_slide_program(mut self) -> SlideResult {
        let ParseResult {
            program,
            diagnostics,
        } = parse_statements(self.tokens, &self.result.org_program);
        self.result.err(&diagnostics);
        if !diagnostics.is_empty() {
            return self.result.failed();
        }
        let program_context = ProgramContext::default().lint(self.lint);
        if self.lint {
            self.result
                .err(&lint_stmt(&program, self.result.org_program));
        }
        if self.parse_only {
            self.result.emit(&program);
            self.result.ok()
        } else {
            let EvaluationResult {
                simplified,
                diagnostics,
            } = evaluate(program, &program_context).unwrap();
            let fatal = diagnostics.iter().any(|d| d.kind == DiagnosticKind::Error);
            self.result.err(&diagnostics);
            if !fatal {
                self.result.emit(&simplified);
            }
            if diagnostics.is_empty() {
                self.result.ok()
            } else {
                self.result.failed()
            }
        }
    }
fn eval_slide_program ( mut self ) -> SlideResult { let ParseResult { program , diagnostics , } = parse_statements ( self . tokens , & self . result . org_program ) ; self . result . err ( & diagnostics ) ; if ! diagnostics . is_empty ( ) { return self . result . failed ( ) ; } let program_context = ProgramContext :: default ( ) . lint ( self . lint ) ; if self . lint { self . result . err ( & lint_stmt ( & program , self . result . org_program ) ) ; } if self . parse_only { self . result . emit ( & program ) ; self . result . ok ( ) } else { let EvaluationResult { simplified , diagnostics , } = evaluate ( program , & program_context ) . unwrap ( ) ; let fatal = diagnostics . iter ( ) . any ( | d | d . kind == DiagnosticKind :: Error ) ; self . result . err ( & diagnostics ) ; if ! fatal { self . result . emit ( & simplified ) ; } if diagnostics . is_empty ( ) { self . result . ok ( ) } else { self . result . failed ( ) } } }
Handles evaluation of a regular slide program (statements, expressions).
Handles evaluation of a regular slide program ( statements expressions ) .
mut self
mut self