Skip to content

Commit

Permalink
Implement comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KajizukaTaichi committed Jul 26, 2024
1 parent a7fcd7e commit b4b746d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ fn parse_program(source: String) -> Block {
.to_string(),
);
program.push(Instruction::While(expr, code_loop))
} else if code.starts_with("//") {
program.push(Instruction::Comment(code[5..code.len()].to_string()))
}
}
program
Expand Down

0 comments on commit b4b746d

Please sign in to comment.