Expand description
Expression / argument resolution: syn::Expr β semantic values.
The numeric-expression layer is parsed by the pest grammar (pest_conv.rs);
everything that still needs rustcβs type context or syn structure lives
here: places (via place.rs), const generics, builtin integer bounds, the
x.len() sugar, tag argument types/targets, and ValidNum predicates.
FunctionsΒ§
- build_
interval_ πpredicates - expr_
to_ πpest - int_
type_ πmin_ max - outermost_
type_ πident - Extract the outermost path segment name from a
syn::Type, e.g.OptionfromOption<NonZero<T>>orNonZerofromNonZero<T>. - parse_
builtin_ πconst - parse_
const_ πparam - parse_
contract_ πexpr - parse_
interval_ πpredicates - parse_
numeric_ πpredicate - parse_
string_ πinterval - parse_
target_ πarg - parse_
type π - parse_
valid_ πnum - resolve_
ty_ πident - Resolve a type identifier to a
Ty, handling theSelfkeyword (whichmatch_ty_with_identdoes not understand) by delegating toresolve_type_name. - resolve_
type_ πname - unwrap_
array_ πexpr - Extract the inner type from
[T](theSplitTransmute([T], [U])notation), then resolve it viaparse_type. The[T]argument arrives as eitherExpr::Array(JSON path, parsed viasyn::parse_str::<Expr>) orExpr::Verbatim(source annotation path, whereparse_property_argβs type-first parse turnsType::SliceintoVerbatim); both are unwrapped to the element typeT.