Skip to content

Commit

Permalink
Removal of dead error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Oct 20, 2023
1 parent 6db705e commit 5633b2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
7 changes: 2 additions & 5 deletions src/compiler/iml/imlprogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,17 @@ impl ImlProgram {
None => return self.statics.insert_full(value.clone(), None).0,
Some(idx) => return idx,
},
ImlValue::This(_) | ImlValue::Unset => unreachable!(),
ImlValue::Local { offset, name, .. } | ImlValue::Global { offset, name, .. } => {
self.errors.push(Error::new(
offset.clone(),
format!("Variable '{}' used in static context", name),
))
}
ImlValue::Name { offset, .. } | ImlValue::Generic { offset, .. } => {
ImlValue::Generic { offset, .. } | ImlValue::Instance { offset, .. } => {
self.errors
.push(Error::new(offset.clone(), format!("Unresolved {}", value)));
}
ImlValue::Instance { offset, .. } => self
.errors
.push(Error::new(offset.clone(), format!("Unresolved {}", value))),
_ => unreachable!(),
}

0
Expand Down
12 changes: 0 additions & 12 deletions src/compiler/iml/imlvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,18 +321,6 @@ impl ImlValue {
return current.0.borrow().constants[name]
.compile(program, current, offset, call, ops)
}
ImlValue::Name { name, .. } => {
program.errors.push(Error::new(
offset.clone(),
if call.is_some() {
format!("Call to unresolved symbol '{}'", name)
} else {
format!("Use of unresolved symbol '{}'", name)
},
));

return;
}
ImlValue::This(_) => {}
ImlValue::Parselet(parselet) => {
let parselet = parselet.borrow();
Expand Down

0 comments on commit 5633b2c

Please sign in to comment.