Implement enum for Layout data type

This commit is contained in:
Keavon Chambers
2020-07-13 15:01:24 -07:00
parent 81509afa7e
commit c41710ab76
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
use crate::color::Color;
use crate::layout_abstract_syntax::*;
#[derive(Debug)]
pub struct VariableParameter {
@@ -36,7 +37,7 @@ pub enum TypeValueOrArgument {
#[derive(Debug)]
pub enum TypeName {
// Layout, // TODO
Layout,
Integer,
Decimal,
AbsolutePx,
@@ -53,7 +54,7 @@ pub enum TypeName {
#[derive(Debug)]
pub enum TypeValue {
// Layout(()), // TODO
Layout(Vec<rctree::Node<LayoutAbstractNode>>),
Integer(i64),
Decimal(f64),
AbsolutePx(f32),
+1 -1
View File
@@ -224,7 +224,7 @@ impl AttributeParser {
// Return the case-insensitive TypeName enum for the individual type
match &individual_type.to_ascii_lowercase()[..] {
// "layout" => TypeName::Layout, // TODO
"layout" => TypeName::Layout,
"integer" => TypeName::Integer,
"decimal" => TypeName::Decimal,
"absolutepx" => TypeName::AbsolutePx,