diff --git a/example.ss b/example.ss index 258c626..5525055 100644 --- a/example.ss +++ b/example.ss @@ -9,13 +9,13 @@ fn fizzbuzz(i) { if i % 3 == 0 { return "Fizz"; }; - return str(i0; + return str(i); }; var i <- 0; var result <- ""; while i < 100 { var i <- i + 1; - var result <- result + " " + fizzbuzz(i) + var result <- result + " " + fizzbuzz(i); }; print result; diff --git a/src/main.rs b/src/main.rs index d145220..8ee25e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -80,6 +80,7 @@ fn parse_program(source: String) -> Block { let name = code[2..code.find("(").expect("チノちゃん「うるさいですね...」")].to_string(); let args: Vec = code[code.find("(").expect("チノちゃん「うるさいですね...」") + - 1 ..code.find(")").expect("チノちゃん「うるさいですね...」")] .to_string() .split(",")