1
0
This commit is contained in:
Jeff 2023-11-06 23:20:59 -05:00
parent 6006de13e5
commit 9828d9c643

View File

@ -12,7 +12,6 @@ use super::{function_call::FunctionCall, logic::Logic, math::Math};
pub enum Expression { pub enum Expression {
Value(ValueNode), Value(ValueNode),
Identifier(Identifier), Identifier(Identifier),
Sublist(Box<Sublist>),
Index(Box<Index>), Index(Box<Index>),
Math(Box<Math>), Math(Box<Math>),
Logic(Box<Logic>), Logic(Box<Logic>),
@ -31,9 +30,6 @@ impl AbstractTree for Expression {
"identifier" => { "identifier" => {
Expression::Identifier(Identifier::from_syntax_node(source, child)?) Expression::Identifier(Identifier::from_syntax_node(source, child)?)
} }
"sublist" => {
Expression::Sublist(Box::new(Sublist::from_syntax_node(source, child)?))
}
"index" => Expression::Index(Box::new(Index::from_syntax_node(source, child)?)), "index" => Expression::Index(Box::new(Index::from_syntax_node(source, child)?)),
"math" => Expression::Math(Box::new(Math::from_syntax_node(source, child)?)), "math" => Expression::Math(Box::new(Math::from_syntax_node(source, child)?)),
"logic" => Expression::Logic(Box::new(Logic::from_syntax_node(source, child)?)), "logic" => Expression::Logic(Box::new(Logic::from_syntax_node(source, child)?)),
@ -63,7 +59,6 @@ impl AbstractTree for Expression {
match self { match self {
Expression::Value(value_node) => value_node.run(source, context), Expression::Value(value_node) => value_node.run(source, context),
Expression::Identifier(identifier) => identifier.run(source, context), Expression::Identifier(identifier) => identifier.run(source, context),
Expression::Sublist(sublist) => sublist.run(source, context),
Expression::Math(math) => math.run(source, context), Expression::Math(math) => math.run(source, context),
Expression::Logic(logic) => logic.run(source, context), Expression::Logic(logic) => logic.run(source, context),
Expression::FunctionCall(function_call) => function_call.run(source, context), Expression::FunctionCall(function_call) => function_call.run(source, context),