1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use crate::nodes::{ Expression, FieldExpression, FunctionCall, IndexExpression, }; #[derive(Clone, Debug, PartialEq, Eq)] pub enum Prefix { Call(FunctionCall), Field(Box<FieldExpression>), Identifier(String), Index(Box<IndexExpression>), Parenthese(Expression), } impl Prefix { pub fn from_name<S: Into<String>>(name: S) -> Self { Self::Identifier(name.into()) } }