Expand description
Statement-shape probes over Solar HIR.
Structsยง
- Stmt
Visitor ๐ - Runs
fon every statement (pre-order, nested ones included) until it breaks.
Functionsยง
- branch_
always_ exits - True when executing
stmtprovably prevents control from continuing past it:return,revert,selfdestruct,require(false, ..)/assert(false), a block containing any such statement, anifwhose both arms exit, atrywhose every clause exits, or ado-whilewhose body exits withoutbreak/continue. - count_
placeholders - Number of
_placeholders instmts, recursing into nested control flow. - count_
placeholders_ ๐in_ stmt - do_
while_ user_ stmts - Strips the trailing
if (cond) break;that lowersdo { ... } while (cond);. - is_
break_ stmt break, possibly wrapped in single-statement blocks.- is_
loop_ termination_ if if (...) break;as synthesized by thedo-whilelowering.- loop_
stmts - The statements of one loop iteration: the body followed by the
forupdate, if any. - loop_
update - The
forupdate statement of a loop, which runs after every iteration. - modifier_
prefix - The statements a modifier runs before its unique
_;, when that placeholder is reached unconditionally.Nonefor non-modifiers, bodiless modifiers and conditional placeholders. - stmt_
expr - The expression directly owned by
stmt(nested statements excluded). - stmts_
before_ placeholder - Collects the statements executed before the first placeholder of a modifier body, following
nested blocks. Returns
Nonewhen the placeholder is not reached unconditionally (e.g. it is inside anif, loop ortry). - stmts_
break_ or_ continue break/continuetargeting the current loop (nested loops shadow them).- visit_
stmts - Runs
fon every statement ofstmtsand their nested statements (pre-order) until it breaks.