aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-01-20 23:45:47 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-01-20 23:45:47 +0100
commit9626aa05496a0e745252ba30bf64e8d020c6ec2a (patch)
tree304aa1d456caf826ba13370978a9fb7ef79a2b2e /src/compiler.rs
parentf663999eccd693ddbfd581a51213b816c461f092 (diff)
downloadsylt-9626aa05496a0e745252ba30bf64e8d020c6ec2a.tar.gz
cleanup
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index aca1b26..d72b8d3 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -143,7 +143,6 @@ impl Frame {
}
fn add_upvalue(&mut self, variable: Variable) -> Variable {
- println!("{} - UPDOG", variable.name);
let new_variable = Variable {
outer_upvalue: variable.upvalue,
outer_slot: variable.slot,
@@ -552,9 +551,6 @@ impl Compiler {
for var in self.frame().upvalues.iter() {
function_block.ups.push((var.outer_slot, var.outer_upvalue, var.typ.clone()));
}
- println!("{:?}", function_block.ups);
- // TODO(ed): Send the original place to find the upvalues,
- // so we know from where to copy them.
});
for op in function_block.ops.iter().rev() {
@@ -586,7 +582,7 @@ impl Compiler {
fn variable_expression(&mut self, block: &mut Block) {
let name = match self.eat() {
Token::Identifier(name) => name,
- __ => unreachable!(),
+ _ => unreachable!(),
};
if let Some(var) = self.find_variable(&name) {
if var.upvalue {
@@ -602,7 +598,7 @@ impl Compiler {
}
}
- fn define_variable(&mut self, name: &str, typ: Type, block: &mut Block) -> Result<usize, ()> {
+ fn define_variable(&mut self, name: &str, typ: Type, _block: &mut Block) -> Result<usize, ()> {
if let Some(var) = self.find_variable(&name) {
if var.scope == self.frame().scope {
error!(self, format!("Multiple definitions of {} in this block.", name));