Skip to content

Commit 2c00c26

Browse files
committed
made simple_example prove recursion of bui
ld system
1 parent 5f09c00 commit 2c00c26

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

examples/simple_example/main.lv

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
use math#(two)
1+
use numbers#(two, three)
2+
use math#(add, increment)
23

34
main :: fun () -> Int: {
4-
2 + two
5+
add(two, to: increment(three))
56
}

examples/simple_example/math.lv

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
two :: 2
1+
use numbers#(one)
2+
3+
add :: fun (x: Int, to y: Int) -> Int: x + y
4+
increment :: fun (x: Int) -> Int: x + one

examples/simple_example/numbers.lv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
one :: 1
2+
two :: 2
3+
three :: 3

src/blush/combiner.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::{
2-
blush::printer,
32
parser::ast::{Expression, ExpressionKind, Program, UseTailItem},
43
span::Span,
54
};
@@ -19,7 +18,6 @@ impl<'a> Combiner<'a> {
1918
}
2019

2120
pub fn combine(self) -> Result<Program, Box<dyn Error>> {
22-
printer::info(&format!("Combining {} ASTs...", self.files.len()));
2321
let Some(main_file) = self
2422
.files
2523
.iter()

src/blush/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ impl Blush {
2222
let path_buf = PathBuf::from(path);
2323
let file_tree = collect_files(&path_buf)?;
2424

25-
printer::info("Reading config file...");
2625
let Some(config_file) = file_tree.find(&|name, _| {
2726
name.split('/')
2827
.next_back()
@@ -46,7 +45,6 @@ impl Blush {
4645
})
4746
.expect("Expected a directory");
4847

49-
printer::info(&format!("Parsing {} files...", lovely_files.len()));
5048
let parsed_lovely_files =
5149
lovely_files.try_map(&|s| Parser::new(s).parse().map_err(std::convert::Into::into))?;
5250
let flattened_files: Vec<(String, &_)> = parsed_lovely_files

0 commit comments

Comments
 (0)