Skip to main content
The SyntaxMatchResult object represents the result of running a syntax (Weggli-compatible) query on a decompiled function. It provides methods to inspect and extract information from the matched code.

Methods

Reference

dump

Returns the matched code as a table of strings, one per query result.

dump_ranges

Returns a table of strings, each representing a matched code snippet for a specific range.

binding_of_match

Returns the binding (variable mapping) of a matched variable as a string. Accepts either a variable name (e.g., "$var"), which returns the binding from the first result, or a table {var = "$var", result = n} to specify both the variable name and the result index.
The result index is 1-based.

address_of_match

Returns the address of a match as an AddressValue. Accepts either a match index, which returns the address from the first result, or a table {match = n, result = m} to specify both the match index and the result index.
Both match and result indices are 1-based.

Example