mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-13 22:06:19 +00:00
wip
This commit is contained in:
parent
8bfead37b2
commit
0ea2dea1a9
3 changed files with 27 additions and 8 deletions
|
@ -50,18 +50,21 @@ pub enum TagNode {
|
|||
bits: Vec<String>,
|
||||
children: Vec<Node>,
|
||||
},
|
||||
Branching {
|
||||
Branch {
|
||||
name: String,
|
||||
bits: Vec<String>,
|
||||
children: Vec<Node>,
|
||||
branches: Vec<TagNode>,
|
||||
},
|
||||
Closing {
|
||||
name: String,
|
||||
bits: Vec<String>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct DjangoFilter {
|
||||
name: String,
|
||||
arguments: Vec<String>,
|
||||
pub name: String,
|
||||
pub arguments: Vec<String>,
|
||||
}
|
||||
|
||||
impl DjangoFilter {
|
||||
|
|
|
@ -5,15 +5,21 @@ use std::fs;
|
|||
use std::path::Path;
|
||||
use toml::Value;
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct TagSpec {
|
||||
#[serde(rename = "type")]
|
||||
pub tag_type: TagType,
|
||||
pub closing: Option<String>,
|
||||
pub intermediates: Option<Vec<String>>,
|
||||
pub intermediates: Option<Vec<IntermediateSpec>>,
|
||||
pub args: Option<Vec<ArgSpec>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct IntermediateSpec {
|
||||
pub name: String,
|
||||
pub args: bool,
|
||||
}
|
||||
|
||||
impl TagSpec {
|
||||
pub fn load_builtin_specs() -> Result<HashMap<String, TagSpec>> {
|
||||
let specs_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("tagspecs");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue