pub enum QueryPattern {
Show 18 variants
Wildcard,
For {
no_take: bool,
},
While {
unbounded: bool,
},
Call {
name: Option<String>,
},
Effect {
class: Option<EffectClass>,
},
Hook {
path: Option<String>,
},
Function {
effect: Option<EffectClass>,
},
Require {
id: Option<String>,
},
Import {
path: Option<String>,
},
Return,
Yield,
Transaction,
Literal {
kind: Option<String>,
},
Binary {
op: Option<BinOp>,
},
Triple,
Reified,
Match,
If,
}Expand description
An S-expression query pattern that matches against AST nodes.
Variants§
Wildcard
Match any node.
For
Match a for-loop. no_take matches for-loops without a take: limit.
While
Match a while-loop. unbounded matches while-loops without a budget.
Call
Match a function call. name matches calls to a specific function.
Effect
Match an effect statement. class matches a specific effect class.
Fields
class: Option<EffectClass>Hook
Match a hook. path matches hooks with a specific path.
Function
Match a function declaration. effect matches functions with a specific effect class.
Fields
effect: Option<EffectClass>Require
Match a capability require. id matches requires for a specific capability.
Import
Match an import. path matches imports of a specific path.
Return
Match a return statement.
Yield
Match a yield statement.
Transaction
Match a transaction statement.
Literal
Match a literal of a specific type.
Binary
Match a binary expression with a specific operator.
Triple
Match a triple expression.
Reified
Match a reified expression.
Match
Match a match statement.
If
Match an if statement.