Add $$ marker to custom syntax.

This commit is contained in:
Stephen Chung
2021-10-25 22:41:42 +08:00
parent 76ac24dd85
commit 79dd3f8186
7 changed files with 38 additions and 17 deletions

View File

@@ -1564,7 +1564,7 @@ impl Stmt {
#[derive(Debug, Clone, Hash)]
pub struct CustomExpr {
/// List of keywords.
pub keywords: StaticVec<Expr>,
pub inputs: StaticVec<Expr>,
/// Is the current [`Scope`][crate::Scope] possibly modified by this custom statement
/// (e.g. introducing a new variable)?
pub scope_may_be_changed: bool,
@@ -2366,7 +2366,7 @@ impl Expr {
}
}
Self::Custom(x, _) => {
for e in &x.keywords {
for e in &x.inputs {
if !e.walk(path, on_node) {
return false;
}