diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-18 15:02:02 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-18 16:57:53 +0100 |
| commit | e01970b20a058ab1b4ebea916f229c9b706c84e4 (patch) | |
| tree | 5c5efc75abd6e607bd45a0602603231edf520503 /src/syntax/ast.rs | |
| parent | 05ec0f993b4a1b8481e494ee16285d23f000872f (diff) | |
Basic show rules
Diffstat (limited to 'src/syntax/ast.rs')
| -rw-r--r-- | src/syntax/ast.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index 8b88096a..9d22121b 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -919,14 +919,14 @@ node! { } impl ShowExpr { - /// The pattern that decides which node's appearence to redefine. - pub fn pattern(&self) -> Expr { - self.0.cast_first_child().expect("show expression is missing pattern") + /// 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 expression that defines the node's appearence. - pub fn body(&self) -> Expr { - self.0.cast_last_child().expect("show expression is missing body") + /// The closure that defines the rule. + pub fn closure(&self) -> ClosureExpr { + self.0.cast_first_child().expect("show expression is missing closure") } } |
