Updated api bootstrap
This commit is contained in:
@@ -11,11 +11,11 @@ use mist_parser::rev_mapper;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct MistDiagnosticMessage {
|
||||
pub message String,
|
||||
pub file_path PathBuf,
|
||||
pub file_name String ,
|
||||
pub line usize,
|
||||
pub column usize,
|
||||
pub String message,
|
||||
pub PathBuf file_path,
|
||||
pub String file_name,
|
||||
pub usize line,
|
||||
pub usize column,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -25,7 +25,7 @@ pub enum MistDiagnostic {
|
||||
Rust(CompilerMessage),
|
||||
}
|
||||
|
||||
pub fn bool build(mut args Vec<String>, root PathBuf) {
|
||||
pub bool build(Vec<String> mut args, PathBuf root) {
|
||||
args.remove(0);
|
||||
args.insert(1, "--message-format=json".to_string());
|
||||
|
||||
@@ -123,7 +123,7 @@ pub fn bool build(mut args Vec<String>, root PathBuf) {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn void print_diagnostics(diagnostics *Vec<MistDiagnostic>) {
|
||||
pub void print_diagnostics(Vec<MistDiagnostic>& diagnostics) {
|
||||
let mut files = HashMap::new();
|
||||
|
||||
for diag in diagnostics {
|
||||
@@ -159,9 +159,9 @@ pub fn void print_diagnostics(diagnostics *Vec<MistDiagnostic>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn Option<String> get_line(
|
||||
files *mut HashMap<PathBuf, Vec<String>>,
|
||||
msg *MistDiagnosticMessage,
|
||||
pub Option<String> get_line(
|
||||
HashMap<PathBuf, Vec<String>> mut& files,
|
||||
MistDiagnosticMessage& msg,
|
||||
) {
|
||||
let src_path = msg.file_path.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user