pub enum ASTNode {
Function {
name: String,
params: Vec<String>,
body: Vec<Statement>,
},
Variable {
name: String,
value: Expr,
},
Import {
path: String,
},
CSSRule {
selector: String,
properties: Vec<Property>,
},
}Expand description
Top-level AST nodes
Variants§
Function
Function definition: @fn name(params): body
Variable
Variable declaration: @var name: value
Import
Import statement: @import ‘path’
CSSRule
CSS rule: selector { properties }
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ASTNode
impl<'de> Deserialize<'de> for ASTNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ASTNode
Auto Trait Implementations§
impl Freeze for ASTNode
impl RefUnwindSafe for ASTNode
impl Send for ASTNode
impl Sync for ASTNode
impl Unpin for ASTNode
impl UnwindSafe for ASTNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more