Skip to content

Commit

Permalink
Fix bug around get parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
KajizukaTaichi committed Jul 27, 2024
1 parent 9c77c42 commit 86391f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example.ss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ fn parse_program(source: String) -> Block {
let name =
code[2..code.find("(").expect("チノちゃん「うるさいですね...」")].to_string();
let args: Vec<String> = code[code.find("(").expect("チノちゃん「うるさいですね...」")
- 1
..code.find(")").expect("チノちゃん「うるさいですね...」")]
.to_string()
.split(",")
Expand Down

0 comments on commit 86391f4

Please sign in to comment.