ast-grep rules
ast-grep rule config
| Type | object |
|---|---|
| File match |
**/.astgrep/rules/**/*.yaml
**/.astgrep/rules/**/*.yml
**/.ast-grep/rules/**/*.yaml
**/.ast-grep/rules/**/*.yml
**/ast-grep/rules/**/*.yaml
**/ast-grep/rules/**/*.yml
**/astgrep/rules/**/*.yaml
**/astgrep/rules/**/*.yml
|
| Schema URL | https://catalog.lintel.tools/schemas/ast-grep/ast-grep-rules/latest.json |
| Source | https://raw.githubusercontent.com/ast-grep/ast-grep/main/schemas/rule.json |
Validate with Lintel
npx @lintel/lintel check
Used for global rules, rewriters, and pyo3/napi
Properties
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
2 nested properties
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Placeholder for language, used in JSON schema only.
Additional meta variables pattern to filter matching
Utility rules that can be used in matches
A dictionary for metavariable manipulation. Dict key is the new variable name. Dict value is a [transformation] that specifies how meta var is processed. See transformation doc.
A pattern string or a FixConfig object to auto fix the issue. It can reference metavariables appeared in rule. See details in fix object reference.
Unique, descriptive identifier, e.g., no-unused-variable
Rewrite rules for rewrite transformation
Main message highlighting why this rule fired. It should be single line and concise, but specific enough to be understood without additional context.
Additional notes to elaborate the message and provide potential fix to the issue.
notes can contain markdown syntax, but it cannot reference meta-variables.
Custom label dictionary to configure reporting. Key is the meta-variable name and value is the label message and label style.
Glob patterns to specify that the rule only applies to matching files
Glob patterns that exclude rules from applying to files
Documentation link to this rule
Extra information for the rule
Definitions
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
2 nested properties
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
nthChild accepts either a number, a string or an object.
A string or number describing the indices of matching nodes in a list of siblings.
Represents a position in source code using 0-based line and column numbers
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
Represents a zero-based character-wise position in a document
0-based line number in the source code
0-based column number in the source code
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
2 nested properties
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
Represents a zero-based character-wise position in a document
2 nested properties
0-based line number in the source code
0-based column number in the source code
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
Control how the relational rule search should stop
Represents a transformation that can be applied to a matched AST node.
Available transformations are substring, replace and convert.
Extracts a substring from the meta variable's text content.
Both start_char and end_char support negative indexing,
which counts character from the end of an array, moving backwards.
source meta variable to be transformed
optional starting character index of the substring, defaults to 0.
optional ending character index of the substring, defaults to the end of the string.
Replaces a substring in the meta variable's text content with another string.
source meta variable to be transformed
a regex to find substring to be replaced
the replacement string
Converts the source meta variable's text content to a specified case format.
source meta variable to be transformed
An enumeration representing different cases for strings.
optional separators to specify how to separate word
An enumeration representing different cases for strings.
Separator to split string. e.g. user_accountName -> user, accountName
It will be rejoin according to StringCase.
A pattern string or fix object to auto fix the issue. It can reference metavariables appeared in rule.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
Placeholder for language, used in JSON schema only.
Used for global rules, rewriters, and pyo3/napi
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A relational rule object, which is a Rule object with two additional fields stopBy and field.
15 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Control how the relational rule search should stop
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
13 nested properties
A String pattern will match one single AST node according to pattern syntax.
Or an object with field context, selector and optionally strictness.
The kind name of the node to match. You can look up code's kind names in playground.
A Rust regular expression to match the node's text. https://docs.rs/regex/latest/regex/#syntax
nthChild accepts either a number, a string or an object.
Represents a position in source code using 0-based line and column numbers
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A relational rule object, which is a Rule object with two additional fields stopBy and field.
A list of sub rules and matches a node if all of sub rules match. The meta variables of the matched node contain all variables from the sub-rules.
A list of sub rules and matches a node if any of sub rules match. The meta variables of the matched node only contain those of the matched sub-rule.
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
-
Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
-
Relational: filter matched target according to their position relative to other nodes.
-
Composite: use logic operation all/any/not to compose the above rules to larger rules.
Every rule has it's unique name so we can combine several rules in one object.
Unique, descriptive identifier, e.g., no-unused-variable
Additional meta variables pattern to filter matching
Utility rules that can be used in matches
A dictionary for metavariable manipulation. Dict key is the new variable name. Dict value is a [transformation] that specifies how meta var is processed. See transformation doc.
A pattern string or a FixConfig object to auto fix the issue. It can reference metavariables appeared in rule. See details in fix object reference.
Additional metadata for the rule, can be used to store extra information.