ls: bool = (false, parse_bool, [UNTRACKED],
"list the symbols defined by a library crate"),
save_analysis: bool = (false, parse_bool, [UNTRACKED],
- "write syntax and type analysis (in JSON format) information in addition to normal output"),
+ "write syntax and type analysis (in JSON format) information, \
+ addition to normal output"),
save_analysis_csv: bool = (false, parse_bool, [UNTRACKED],
- "write syntax and type analysis (in CSV format) information in addition to normal output"),
+ "write syntax and type analysis (in CSV format) information, in addition to normal output"),
+ save_analysis_api: bool = (false, parse_bool, [UNTRACKED],
+ "write syntax and type analysis information for opaque libraries (in JSON format), \
+ in addition to normal output"),
print_move_fragments: bool = (false, parse_bool, [UNTRACKED],
"print out move-fragment data for every fn"),
flowgraph_print_loans: bool = (false, parse_bool, [UNTRACKED],
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.save_analysis_csv = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
+ opts.debugging_opts.save_analysis_api = true;
+ assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.print_move_fragments = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.flowgraph_print_loans = true;
fn save_analysis(sess: &Session) -> bool {
sess.opts.debugging_opts.save_analysis ||
- sess.opts.debugging_opts.save_analysis_csv
+ sess.opts.debugging_opts.save_analysis_csv ||
+ sess.opts.debugging_opts.save_analysis_api
}
fn save_analysis_format(sess: &Session) -> save::Format {
save::Format::Json
} else if sess.opts.debugging_opts.save_analysis_csv {
save::Format::Csv
+ } else if sess.opts.debugging_opts.save_analysis_api {
+ save::Format::JsonApi
} else {
unreachable!();
}
pub enum Format {
Csv,
Json,
+ JsonApi,
}
impl Format {
fn extension(&self) -> &'static str {
match *self {
Format::Csv => ".csv",
- Format::Json => ".json",
+ Format::Json | Format::JsonApi => ".json",
}
}
}
match format {
Format::Csv => dump!(CsvDumper::new(output)),
Format::Json => dump!(JsonDumper::new(output)),
+ Format::JsonApi => /* TODO */ dump!(JsonDumper::new(output)),
}
}