MCPcopy Create free account
hub / github.com/ForLoveOfCats/fae / parse_command

Function parse_command

src/cli.rs:91–123  ·  view source on GitHub ↗
(
	cli_arguments: &mut CliArguments,
	any_errors: &mut bool,
	arg: &OsStr,
	iterator: &mut impl Iterator<Item = OsString>,
)

Source from the content-addressed store, hash-verified

89}
90
91fn parse_command(
92 cli_arguments: &mut CliArguments,
93 any_errors: &mut bool,
94 arg: &OsStr,
95 iterator: &mut impl Iterator<Item = OsString>,
96) -> bool {
97 let Some(arg) = arg.to_str() else {
98 return false;
99 };
100
101 match arg {
102 "parse" | "p" => cli_arguments.command = CompileCommand::Parse,
103
104 "check" | "c" => cli_arguments.command = CompileCommand::Check,
105
106 "build" | "b" => cli_arguments.command = CompileCommand::Build,
107
108 "run" | "r" => cli_arguments.command = CompileCommand::Run,
109
110 "test" | "t" => cli_arguments.command = CompileCommand::Test,
111
112 "clean" => cli_arguments.command = CompileCommand::Clean,
113
114 "ct" => {
115 cli_arguments.command = CompileCommand::CompilerTest;
116 parse_test_names(cli_arguments, any_errors, iterator);
117 }
118
119 _ => return false,
120 }
121
122 true
123}
124
125fn parse_tack_option(
126 cli_arguments: &mut CliArguments,

Callers 1

parse_argumentsFunction · 0.85

Calls 1

parse_test_namesFunction · 0.85

Tested by

no test coverage detected