Fix some formatting issues, mostly around comments and whitespace.
This commit is contained in:
16
src/eval.rs
16
src/eval.rs
@@ -1,5 +1,5 @@
|
||||
//! Helpful functions for evaluating NGR programs.
|
||||
//!
|
||||
//!
|
||||
//! Look, this is a compiler, and so you might be asking why it has a bunch of
|
||||
//! stuff in it to help with writing interpreters. Well, the answer is simple:
|
||||
//! testing. It's really nice to know that if you start with a program that
|
||||
@@ -9,15 +9,15 @@
|
||||
//! programs don't do 100% the same things in the same order, but you shouldn't
|
||||
//! be able to observe the difference ... at least, not without a stopwatch,
|
||||
//! memory profilers, etc.
|
||||
//!
|
||||
//!
|
||||
//! The actual evaluators for our various syntaxes are hidden in `eval` functions
|
||||
//! of the various ASTs. It's nice to have them "next to" the syntax that way, so
|
||||
//! that we just edit stuff in one part of the source tree at a time. This module,
|
||||
//! then, just contains some things that are generally helpful across all the
|
||||
//! interpreters we've written.
|
||||
//!
|
||||
//!
|
||||
//! In particular, this module helps with:
|
||||
//!
|
||||
//!
|
||||
//! * Defining a common error type -- [`EvalError`] -- that we can reasonably
|
||||
//! compare. It's nice to compare errors, here, because we want to know that
|
||||
//! if a program used to fail, it will still fail after we change it, and
|
||||
@@ -45,7 +45,7 @@ pub use value::Value;
|
||||
use crate::backend::BackendError;
|
||||
|
||||
/// All of the errors that can happen trying to evaluate an NGR program.
|
||||
///
|
||||
///
|
||||
/// This is yet another standard [`thiserror::Error`] type, but with the
|
||||
/// caveat that it implements [`PartialEq`] even though some of its
|
||||
/// constituent members don't. It does so through the very sketchy mechanism
|
||||
@@ -102,17 +102,17 @@ impl PartialEq for EvalError {
|
||||
EvalError::Linker(a) => match other {
|
||||
EvalError::Linker(b) => a == b,
|
||||
_ => false,
|
||||
}
|
||||
},
|
||||
|
||||
EvalError::ExitCode(a) => match other {
|
||||
EvalError::ExitCode(b) => a == b,
|
||||
_ => false,
|
||||
}
|
||||
},
|
||||
|
||||
EvalError::RuntimeOutput(a) => match other {
|
||||
EvalError::RuntimeOutput(b) => a == b,
|
||||
_ => false,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user