Hacker News new | ask | show | jobs
by nigeltao 392 days ago
For Wuffs, top level declarations start with either pub or pri (and both keywords have the same width, in a monospace font).

    pub status "#blah"
    pub struct foo(etc etc)
    pri func foo.bar(etc etc)
Since code is also auto-formatted, you can do things like "show me a structural overview of a package's source code" with a simple grep:

    rg -N ^p   std/jpeg/*.wuffs
If you want just the exported API, change p to pub:

    rg -N ^pub std/jpeg/*.wuffs