Skip to content

Commit

Permalink
Implement instruction of import
Browse files Browse the repository at this point in the history
  • Loading branch information
KajizukaTaichi committed Jul 27, 2024
1 parent e673eea commit e64c9c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2021"

[dependencies]
pyo3 = "0.22.2"
sila-transpiler-infrastructure = "0.3.3"
sila-transpiler-infrastructure = "0.3.4"
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ fn parse_program(source: String) -> Block {
program.push(Instruction::While(expr, code_loop))
} else if code.starts_with("//") {
program.push(Instruction::Comment(code[2..code.len()].trim().to_string()))
} else if code.starts_with("import") {
program.push(Instruction::Import(code[6..code.len()].trim().to_string()))
}
}
program
Expand Down

0 comments on commit e64c9c2

Please sign in to comment.