Clean up
This commit is contained in:
parent
6006de13e5
commit
9828d9c643
@ -12,7 +12,6 @@ use super::{function_call::FunctionCall, logic::Logic, math::Math};
|
||||
pub enum Expression {
|
||||
Value(ValueNode),
|
||||
Identifier(Identifier),
|
||||
Sublist(Box<Sublist>),
|
||||
Index(Box<Index>),
|
||||
Math(Box<Math>),
|
||||
Logic(Box<Logic>),
|
||||
@ -31,9 +30,6 @@ impl AbstractTree for Expression {
|
||||
"identifier" => {
|
||||
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)?)),
|
||||
"math" => Expression::Math(Box::new(Math::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 {
|
||||
Expression::Value(value_node) => value_node.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::Logic(logic) => logic.run(source, context),
|
||||
Expression::FunctionCall(function_call) => function_call.run(source, context),
|
||||
|
Loading…
Reference in New Issue
Block a user