Remove 'text' member from Compile struct, since we can return file positions instead

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-09-16 17:36:40 -07:00
parent 099ee5ea0d
commit 61ac00ae39
3 changed files with 20 additions and 23 deletions

View File

@@ -203,12 +203,12 @@ impl Flatten {
/// Thunks are the basic building blocks of the IR. Thunks form a chain of decision paths that may
/// be taken, which allows an optimizer to remove dead code, detect endless loops, and so on. This
/// allows for shrinking blocks of code without having to recalculate jump addresses.
pub struct CompileBody<'c, 't> {
compile: &'c mut Compile<'t>,
pub struct CompileBody<'c> {
compile: &'c mut Compile,
}
impl<'c, 't> CompileBody<'c, 't> {
pub fn new(compile: &'c mut Compile<'t>) -> Self {
impl<'c> CompileBody<'c> {
pub fn new(compile: &'c mut Compile) -> Self {
CompileBody { compile }
}
@@ -224,7 +224,7 @@ impl<'c, 't> CompileBody<'c, 't> {
// impl Visit for CompileBody
//
impl Visit for CompileBody<'_, '_> {
impl Visit for CompileBody<'_> {
// XXX
// Trying to "future-proof" by using Result<_> in case there's some reason that an error
// may need to be thrown in the future so I don't have to wrap every return value in Ok(_)