Skip to main content

Module ast

Module ast 

Source
Expand description

The abstract syntax tree the parser produces and the compiler consumes.

An RSL script is a flat list of Stmts executed top to bottom; the only nesting comes from if and for, which carry their own bodies. Everything that also has to survive into bytecode — matchers, bodies, severities — is re-exported from [ruso_runtime::contract] rather than redefined here, so the parser and the VM cannot drift apart.

Structs§

InlinePart
One part of a multipart request body.
ObjectBody
A structured request body (data { … } / json { … }): ordered key/value pairs. Order is preserved so serialization is deterministic.
Program
A parsed script: every statement in source order.
QualifiedField
A response field selector: which probe (target) and which part of its response (kind) a matcher or evidence rule reads.
QualifiedMatch
A single matcher: a response field tested against a predicate.
SocketProbe
Generic socket probe fields shared by dns, tcp, and udp.

Enums§

BodyValue
A value inside an ObjectBody or multipart body.
CmpOp
A comparison operator used by MatchPredicate::Compare.
CmpValue
The right-hand operand of a MatchPredicate::Compare.
EvidenceKind
A proof string attached to a finding. Every rule names an explicit source (.body, .response, or .header "<name>"); an optional regex extracts capture group 1 (or the whole match) from that source instead of taking it whole.
ExtractSource
Where an extract pulls a value from (HTTP only).
FieldKind
Which part of a probe response a matcher reads.
HttpItem
One setting inside an http block.
HttpMethod
HTTP request method for an http probe.
InlinePartBody
The content of an InlinePart.
ListSource
What a for … in … loop iterates over.
MatchPredicate
The condition a QualifiedField is tested against.
Severity
Finding severity, in ascending order of urgency (Info is the catch-all used when a check declares no severity).
Stmt
One statement of a script.
Value
The right-hand side of a set.