Add conversion from component AST to flat component with content attribute (resolves #3), add XML attribute parsing, fix template string attribute parsing bug

This commit is contained in:
Keavon Chambers
2020-07-15 01:11:52 -07:00
parent c41710ab76
commit b0f24b546e
17 changed files with 352 additions and 223 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
use crate::layout_abstract_types::*;
#[derive(Debug)]
#[derive(Debug, Clone, PartialEq)]
pub enum LayoutAbstractNode {
Tag(LayoutAbstractTag),
Text(String),
@@ -16,7 +16,7 @@ impl LayoutAbstractNode {
}
}
#[derive(Debug)]
#[derive(Debug, Clone, PartialEq)]
pub struct LayoutAbstractTag {
pub namespace: String,
pub name: String,
@@ -37,7 +37,7 @@ impl LayoutAbstractTag {
}
}
#[derive(Debug)]
#[derive(Debug, Clone, PartialEq)]
pub struct Attribute {
pub name: String,
pub value: AttributeValue,
@@ -49,7 +49,7 @@ impl Attribute {
}
}
#[derive(Debug)]
#[derive(Debug, Clone, PartialEq)]
pub enum AttributeValue {
VariableParameter(VariableParameter),
TypeValue(Vec<TypeValueOrArgument>),