hylo-lang / hylodoc

Code documentation generator for Hylo
https://hylodoc.web.app
Apache License 2.0
1 stars 0 forks source link

Only export public declarations into the website #4

Open tothambrus11 opened 3 months ago

tothambrus11 commented 3 months ago

Currently, there is no filtering for symbols in the website generation. Readers are only interested in declarations that they can use from outside the module, so we should filter for public declarations. Refer to https://github.com/hylo-lang/specification/blob/main/spec.md#modifiers for details.

Relevant files from Hylo frontend: AccessModifier.swift, all files within Frontend/AST/Decl. Relevant folder from HyloDoc: Sources/WebsiteGen/

tothambrus11 commented 3 months ago

It is currently a bit convoluted the way we render members in traits and product type pages: we convert them to targets, filter them and convert them back. This should be also simplified. isSupportedDecl in PartialTargetResolution.swift should be removed since we support everything except stuff where we don't traverse into anymore. It should be replaced with another function that checks if the declaration is publicly exposed.