Skip to content

Commit 2ebccbc

Browse files
committed
feat: added more arguments and a check command
1 parent 0000063 commit 2ebccbc

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

  • compiler/compiler_main/src

compiler/compiler_main/src/cli.rs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,38 @@ pub enum Platform {
1212
LLVM,
1313
}
1414

15+
#[derive(Clone, Copy, PartialEq, Eq, ValueEnum, Debug)]
16+
pub enum IRLayer {
17+
HIR,
18+
MIR,
19+
}
20+
1521
#[derive(Subcommand)]
1622
pub enum CLICommand {
17-
#[command(visible_alias = "b")]
23+
#[command(visible_alias = "b", about = "Builds the given file(s)")]
1824
Build {
1925
#[arg(short = 'o')]
2026
out: String,
2127

2228
#[arg(long, value_enum, default_value = "llvm")]
2329
platform: Platform,
2430

31+
#[arg(short = 'l', default_value = "ld")]
32+
linker: String,
33+
34+
#[arg(required = true)]
35+
input: Vec<String>,
36+
},
37+
38+
#[command(visible_alias = "ver", about = "Displays the version")]
39+
Version,
40+
41+
#[command(about = "Checks if a file is valid")]
42+
Check {
2543
#[arg(required = true)]
2644
input: Vec<String>,
45+
46+
#[arg(long, value_enum, default_value = "mir")]
47+
layer: IRLayer,
2748
},
2849
}

0 commit comments

Comments
 (0)