Add command to resolve a location to an address
This commit is contained in:
parent
5c7a49342d
commit
366fd04745
16
src/main.rs
16
src/main.rs
@ -534,6 +534,22 @@ fn main() -> Result<(), ReplError> {
|
||||
}
|
||||
},
|
||||
)
|
||||
.with_command(
|
||||
Command::new("resolve")
|
||||
.arg(
|
||||
Arg::new("location")
|
||||
.help("The location to resolve")
|
||||
.required(true),
|
||||
)
|
||||
.help("Resolve a location to an address"),
|
||||
|args, state| {
|
||||
let location = args.get_one::<String>("location").unwrap();
|
||||
Ok(Some(format!(
|
||||
"{}",
|
||||
parse_location(location, &state.symbol_tables)?.displayer(&state.symbol_tables)
|
||||
)))
|
||||
},
|
||||
)
|
||||
.with_command(
|
||||
Command::new("quit")
|
||||
.visible_alias("q")
|
||||
|
Loading…
Reference in New Issue
Block a user