capture
capture TBD
Definition: https://github.com/Cyfrin/aderyn/blob/dev/aderyn_core/src/detect/mod.rs#L8
Usage:
The capture!
macro is designed to simplify the process of capturing instances of issues within the AST during analysis. It abstracts the boilerplate code necessary to check, capture, and store these instances based on their node IDs and sort keys.
Practically, it is responsible for populating the found_instances
BTreeMap of the detector struct with the desired nodes.
Parameters:
$self
: The self-reference of the issue detector instance.$context
: The context in which the AST nodes are being analyzed, typically a reference toWorkspaceContext
.$item
: The item being captured as an issue instance, which could be a specific type of node likeExpression
,Statement
,ModifierDefinition
, etc. or even a more generalASTNode
.
Example
Last updated