remove assignments

This commit is contained in:
Josh Thomas 2025-01-06 22:21:49 -06:00
parent 1827f10be6
commit 43e6ea8054
13 changed files with 1547 additions and 28 deletions

View file

@ -114,7 +114,6 @@ pub enum Block {
tag: Tag,
nodes: Vec<Node>,
closing: Option<Box<Block>>,
assignments: Option<Vec<Assignment>>,
},
Branch {
tag: Tag,
@ -169,7 +168,6 @@ Block::Block {
tag: Tag, // The opening Tag of the block
nodes: Vec<Node>, // Nodes contained within the block
closing: Option<Box<Block>>, // Contains Block::Closing if present
assignments: Option<Vec<Assignment>>, // Assignments declared within the tag
}
```

View file

@ -149,7 +149,6 @@ pub enum Block {
tag: Tag,
nodes: Vec<Node>,
closing: Option<Box<Block>>,
assignments: Option<Vec<Assignment>>,
},
Branch {
tag: Tag,
@ -193,13 +192,6 @@ impl Block {
}
}
pub fn assignments(&self) -> Option<&Vec<Assignment>> {
match self {
Block::Block { assignments, .. } => assignments.as_ref(),
_ => None,
}
}
pub fn template_name(&self) -> Option<&String> {
match self {
Block::Inclusion { template_name, .. } => Some(template_name),
@ -324,7 +316,6 @@ mod tests {
},
nodes: vec![],
closing: None,
assignments: None,
})];
let ast = Ast {

View file

@ -153,7 +153,6 @@ impl Parser {
tag,
nodes,
closing,
assignments: None,
}))
}

View file

@ -79,6 +79,5 @@ nodes:
start: 63
length: 5
assignment: ~
assignments: ~
line_offsets:
- 0

View file

@ -59,6 +59,5 @@ nodes:
start: 55
length: 6
assignment: ~
assignments: ~
line_offsets:
- 0

View file

@ -36,6 +36,5 @@ nodes:
start: 40
length: 5
assignment: ~
assignments: ~
line_offsets:
- 0

View file

@ -92,7 +92,6 @@ nodes:
start: 151
length: 5
assignment: ~
assignments: ~
- Variable:
bits:
- group
@ -135,7 +134,6 @@ nodes:
start: 223
length: 5
assignment: ~
assignments: ~
- Block:
Block:
tag:
@ -169,7 +167,6 @@ nodes:
start: 265
length: 5
assignment: ~
assignments: ~
- Block:
Branch:
tag:
@ -202,7 +199,6 @@ nodes:
start: 317
length: 6
assignment: ~
assignments: ~
- Block:
Branch:
tag:
@ -235,7 +231,6 @@ nodes:
start: 351
length: 5
assignment: ~
assignments: ~
- Text:
content: "!"
span:

View file

@ -56,7 +56,6 @@ nodes:
start: 61
length: 5
assignment: ~
assignments: ~
closing:
Closing:
tag:
@ -70,6 +69,5 @@ nodes:
start: 72
length: 6
assignment: ~
assignments: ~
line_offsets:
- 0

View file

@ -108,7 +108,6 @@ nodes:
start: 323
length: 6
assignment: ~
assignments: ~
- Text:
content: "<footer>Page Footer</footer>"
span:
@ -120,7 +119,6 @@ nodes:
start: 366
length: 6
closing: ~
assignments: ~
line_offsets:
- 0
- 24

View file

@ -29,6 +29,5 @@ nodes:
start: 26
length: 9
closing: ~
assignments: ~
line_offsets:
- 0

View file

@ -24,6 +24,5 @@ nodes:
start: 30
length: 7
closing: ~
assignments: ~
line_offsets:
- 0

View file

@ -194,7 +194,6 @@ nodes:
start: 767
length: 5
assignment: ~
assignments: ~
closing:
Closing:
tag:
@ -208,7 +207,6 @@ nodes:
start: 791
length: 5
assignment: ~
assignments: ~
- Text:
content: "</div>"
span:

File diff suppressed because it is too large Load diff