Structs§
- Combined
Scan - A struct to group all rules according to their potential kinds. This can greatly reduce traversal times and skip unmatchable rules. Rules are referenced by their index in the rules vector.
- Deserialize
Env - A struct to store information to deserialize rules.
- Fixer
- Label
- A label is a way to mark a specific part of the code with a styled message.
It is used to provide diagnostic information in LSP or CLI.
’r represents a lifetime for the message string from
rule
. ’t represents a lifetime for the node from a asttree
. - Metadata
- A trivial wrapper around a HashMap to work around
the limitation of
serde_yaml::Value
not implementingJsonSchema
. - Rule
Collection - A collection of rules to run one round of scanning. Rules will be grouped together based on their language, path globbing and pattern rule.
- Rule
Config - Rule
Core - Serializable
Rule - A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
- Serializable
Rule Config - Serializable
Rule Core - Used for global rules, rewriters, and pyo3/napi