dap: support arrays as arguments

This commit is contained in:
Dmitry Sharshakov 2021-10-24 17:24:18 +03:00
parent d6e8a44d85
commit 6aa9838ea6
No known key found for this signature in database
GPG key ID: 471FD32E15FD8473
2 changed files with 30 additions and 7 deletions

View file

@ -104,13 +104,20 @@ pub enum DebugConfigCompletion {
Advanced(AdvancedCompletion),
}
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum DebugArgumentValue {
String(String),
Array(Vec<String>),
}
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct DebugTemplate {
pub name: String,
pub request: String,
pub completion: Vec<DebugConfigCompletion>,
pub args: HashMap<String, String>,
pub args: HashMap<String, DebugArgumentValue>,
}
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]