From 2890a156d27c02a101137bf01dc2046597110bd1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 12 Mar 2022 14:24:24 +0100 Subject: Remove classes and improve naming --- src/syntax/ast.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index f48b445c..928680e5 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -900,16 +900,14 @@ node! { } impl SetExpr { - /// The class to set style properties for. - pub fn class(&self) -> Ident { - self.0.cast_first_child().expect("set expression is missing class") + /// The function to set style properties for. + pub fn target(&self) -> Ident { + self.0.cast_first_child().expect("set rule is missing target") } /// The style properties to set. pub fn args(&self) -> CallArgs { - self.0 - .cast_first_child() - .expect("set expression is missing argument list") + self.0.cast_last_child().expect("set rule is missing argument list") } } @@ -919,14 +917,14 @@ node! { } impl ShowExpr { - /// The class to set the show rule for. - pub fn class(&self) -> Ident { - self.0.cast_first_child().expect("show expression is missing class") + /// The function to customize with this show rule. + pub fn target(&self) -> Ident { + self.0.cast_first_child().expect("show rule is missing target") } /// The closure that defines the rule. - pub fn closure(&self) -> ClosureExpr { - self.0.cast_first_child().expect("show expression is missing closure") + pub fn recipe(&self) -> ClosureExpr { + self.0.cast_last_child().expect("show rule is missing closure") } } -- cgit v1.2.3