Expand description
HIR-aware enrichments.
Pure functions over solarβs HIR:
build_name_to_page: maps contract names to their MDX page paths.inheritance_links:**Inherits:**line for a contract page.natspec_doc: resolves effective NatSpec for a callable item.replace_inline_links: rewrites{Ident}to markdown links.
StructsΒ§
- Getter
Field - One rendered row of a public variable getter signature (its name, ABI type and the inherited description).
- Local
Members - Members of the contract page currently being rendered.
- Name
ToPage - Maps Solidity identifiers and HIR ids to their output MDX page paths
relative to
pages/. - NatSpec
Doc - Effective NatSpec for an item, resolved by Solar and aligned with the itemβs callable signature.
EnumsΒ§
- Inherited
Contract π
FunctionsΒ§
- build_
name_ to_ page - Build the
NameToPageindex from HIR by re-deriving each itemβs output path. - callable_
function π - clean_
block_ πdoc_ content - Strip the
*block-comment line decoration from each line of a/** */NatSpec itemβs content. Solar preserves raw source bytes, so continuation lines look like* textand blank separator lines look like*. This normalises them to plain text / empty lines. - continuation_
parent π - Returns the original tagged parent of a synthetic line-comment notice. The outer
Optiondistinguishes a continuation from a standalone untagged notice; the inner value isNonewhen Solarβs resolved view omitted the parent because a local section replaced it. - direct_
base_ πitems - doc_
from_ πview - effective_
natspec_ πdoc - empty_
natspec_ πdoc - escape_
link_ πlabel - Escape a string for use as a markdown link label.
- exact_
override_ πitem - function_
signature_ πanchor - function_
source_ πparam_ types - Extracts function parameter types exactly as spelled in source for link anchors.
- getter_
field π - implicit_
edge_ πcompatible - inheritance_
links - Returns the
**Inherits:**markdown string for a contract, orNoneif it has no bases. - insert_
function_ πanchors - Record the heading and exact signature anchor for a rendered Solidity function.
- natspec_
doc - Resolves explicit NatSpec inheritance, or Foundryβs conservative implicit inheritance policy.
- normalize_
sol_ πtype - Canonicalizes Solidity type aliases for generated link anchors.
- normalized_
natspec_ πcontent - page_
link π - Produce a vocs-style link from
pagerelative tocurrent_page. - parameter_
names_ πequal - parse_
inline_ πlink - Parse
{[xref-]Ident[-part]}[label]starting at offset 0 ins. - positional_
description π - push_
non_ πyul_ base_ items - render_
ty π - Renders a resolved type as its ABI signature string.
- replace_
inline_ links - Replace
{Ident}and{xref-Ident}with markdown links usingname_to_page. - resolve_
page π - Pick the best candidate page for a given cross-reference lookup.
- slug_
anchor_ πsegment - source_
paths π - xref_
part_ πanchor