Expand description
This module is responsible for matching a search pattern against a node in the AST. In the process of matching, placeholder values are recorded.
MacrosΒ§
- fail_
match π - match_
error π
StructsΒ§
- Match
- Information about a match that was found.
- Match
Failed π - An βerrorβ indicating that matching failed. Use the fail_match! macro to create and return this.
- Match
Failure πReason - Matcher π
- Checks if our search pattern matches a particular node of the AST.
- Pattern
Iterator π - Placeholder
Match π - Information about a placeholder bound in a match.
EnumsΒ§
- Phase π
- Which phase of matching weβre currently performing. We do two phases because most attempted matches will fail and it means we can defer more expensive checks to the second phase.
ConstantsΒ§
FunctionsΒ§
- get_
match π - Checks if
codematches the search pattern found insearch_scope, returning information about the match, if it does. Since we only do matching in this module and searching is done by the parent module, we donβt populate nested matches. - is_
closing_ πtoken - only_
ident π - record_
match_ πfails_ reasons_ scope - recording_
match_ πfail_ reasons