Expand description
Parsing utilities for #[rapx::requires(...)] outer attributes.
This module converts a raw #[rapx::requires(...)] attribute string into a
structured representation that the verification analysis can consume without
depending on syn expression details in later stages.
The currently supported shape is:
#[rapx::requires(property_call, kind = "...")]where kind = "..." applies to the property in the same attribute.
Structsยง
- Attr
Property ๐ - The raw syntactic form of a property call
tag(arg0, arg1, ...)parsed from an attribute โ the unevaluated stage, before semantic resolution into aProperty. - Require
Outer ๐Attribute - A thin wrapper that allows parsing exactly one outer attribute from a string.
Functionsยง
- is_
expected_ ๐syn_ rapx_ attr - Check whether an attribute path is exactly
rapx::<expected_name>. - parse_
property_ ๐arg - Parse a single property argument as an
Expr. - parse_
property_ ๐head - Parse a property call head
tag(arg0, arg1, ...). - parse_
rapx_ ๐attr - Parse a raw attribute string into a structured
requiresproperty. - strip_
lifetime_ ๐ticks - Strips the leading
'from Rust lifetime tokens so thatsyncan parse them as regular identifier expressions inside attribute arguments. For example,'abecomesa,'staticbecomesstatic. - type_
to_ ๐arg_ expr - Convert a parsed argument
Typeback into theExprform expected by the property builder: plain paths stayExpr::Path, everything else (generics, arrays, tuples, references) becomesExpr::Verbatim.