aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-03-01 19:00:58 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-01 19:00:58 +0100
commit1254dc1cf955d3c310a24e3330a92cc318931654 (patch)
treec25c376c83ac9829f5e818011d401b5afcdeda00 /src/compiler.rs
parent6a362119925cbcf7d14c7fa2a0d41c0745e86d92 (diff)
downloadsylt-1254dc1cf955d3c310a24e3330a92cc318931654.tar.gz
remove prints
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index df88c7d..5ae5bdb 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -770,10 +770,6 @@ impl<'a, 'b> Compiler {
}
}
- fn to_namespace(&self, path: &PathBuf) -> String {
- path.to_str().unwrap().strip_suffix(".sy").unwrap().to_string()
- }
-
fn find_namespace(&self, name: &str) -> Option<&Namespace> {
match self.names().get(name) {
Some(Name::Namespace(path)) => Some(&self.contextes.get(path).unwrap().namespace),
@@ -1030,7 +1026,6 @@ impl<'a, 'b> Compiler {
function_block.ty = Type::Function(args, Box::new(return_type));
let function_block = Rc::new(RefCell::new(function_block));
-
// Note(ed): We deliberately add the constant as late as possible.
// This behaviour is used in `constant_statement`.
let function = Value::Function(Vec::new(), Rc::clone(&function_block));
@@ -1468,12 +1463,9 @@ impl<'a, 'b> Compiler {
Token::Identifier(name) => name,
_ => unreachable!(),
};
- println!("dotted {}", name);
if let Some(_) = self.find_namespace(&name) {
- println!("A");
self.expression(block);
} else {
- println!("B");
parse_branch!(self, block, [self.blob_field(block), self.expression(block)]);
}
}
@@ -1695,7 +1687,6 @@ impl<'a, 'b> Compiler {
for section in 0..self.sections.len() {
self.init_section(section);
let section = &self.sections[section];
- println!("SECTION: {:?} -- {:?}", section.path, section.tokens.first());
match (section.tokens.get(0), section.tokens.get(1), section.tokens.get(2)) {
(Some((Token::Use, _)),
Some((Token::Identifier(name), _)), ..) => {