summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-03-12 14:24:24 +0100
committerLaurenz <laurmaedje@gmail.com>2022-03-12 14:24:24 +0100
commit2890a156d27c02a101137bf01dc2046597110bd1 (patch)
treec6bdeb48242c0fbd5b5e13120ca3c8f502d41b75 /src/syntax
parent5ac7eb3860ebd3247f6486c227e816894cb8fd91 (diff)
Remove classes and improve naming
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/ast.rs20
1 files changed, 9 insertions, 11 deletions
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")
}
}