Expand description
Place resolution: syn::Expr β ContractPlace.
Semantic resolution of contract places (arguments, locals, field
projections, iter()/each_element() element projection, unwrap_some()
enum downcast) against rustcβs type context. This layer depends only on
types.rs and crate helpers, so both the property builder (builder.rs)
and the pest-based expression converter (pest_conv.rs) can share it
without a dependency cycle.
FunctionsΒ§
- detect_
array_ πfor_ each - Check if the given expression refers to a function parameter whose type is
an array. If so, return a
ContractPlacefor that parameter to be used as thefor_eachcontainer. - parse_
contract_ πplace - parse_
expr_ πinto_ local_ and_ ty - parse_
named_ πplace - resolve_
next_ πfield - resolve_
place_ πfrom_ ident - Resolve a place given its base identifier and field-name list directly,
without going through a
synexpression. Used by the pest converter. - resolve_
projection_ πfrom_ base_ ident - resolve_
projection_ πfrom_ struct_ ident - strip_
iter_ πelements - Strip
IterElementsfrom a property arg and return the container place (without the projection) ifIterElementswas present.