[silver:compiler:extension:doc:core]

Contents of [silver:compiler:extension:doc:core]:

Defined in this grammar:

function parseComment   (DclComment ::= conf::Decorated CmdArgs body::DocComment_t )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocumentedAGDcl.sv line 16.

Parameter conf
Global compiler config, used to see if any of the doc-related options are set. If none are, comment is not parsed
Parameter body
The Doc-comment token.
Return
If we are parsing docs, the actual doc-comment parsed into a DclComment (which could be an errorDclComment) or if we aren’t then theEmptyDclComment.

Parse the doc-comment mini language in a DocComment_t, returning a DclComment.


concrete production documentedAGDcl   (top::AGDcl ::= comment::DocComment_t dcl::AGDcl )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocumentedAGDcl.sv line 45.

Forward
Forwards to the wrapped AGDcl.

This wraps an AGDcl to allow it to be prefixed with a doc comment. AGDcls will by default emit an doc item that notes that it is undocumented (via mkUndocumentedItem.) This does not pass those up, since they are documented here.


concrete production standaloneCommentAGDcl   (top::AGDcl ::= '@' comment::DocComment_t )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocumentedAGDcl.sv line 91.

Forward
emptyAGDcl.

Doc comment without associated AGDcl.


inherited attribute scopeName :: String

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/TypeClassDcls.sv line 7.

What to prefix ‘child’ declaration names with in docs and for hyperlinking.


fun toSplitFiles   ([Pair<String String>] ::= g::Decorated Grammar with {decorate, downDocConfig} grammarConf::[DocConfigSetting] forIndex::[CommentItem] soFar::[Pair<String String>] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/RootSpec.sv line 42.

Turn the files in a grammar into zero or more single-file docs pages, and collect the rest of the docs (possibly zero) into the index file.


data nonterminal DocConfigSetting

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 7.

Represents a single setting (key = value) of a doc configuration option. Some are file-scope, and some are grammar-scope (see fileScope at silver:compiler:extension:doc:core/DocConfig.sv#23.)


synthesized attribute fileScope :: Boolean

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 23.

Is this DocConfigSetting at silver:compiler:extension:doc:core/DocConfig.sv#7 local to the file (e.g. @title) or to the grammar (e.g. @grammarTitle)?


monoid attribute docs :: [CommentItem]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 11.

Used for getting doc comments on AGDcls to emit. Note that not every item really should be emitted, see doEmit.


Doc config is managed in both a per-file, and per-grammar way. Directives are either file-scope or grammar-scope. A file-scoped directive for the same setting beats a grammar-scoped one. To do this, directives flow up via upDocConfig at silver:compiler:extension:doc:core/Root.sv#26 from AGDcls to reach grammarRootSpec and then flow back down via downDocConfig at silver:compiler:extension:doc:core/Root.sv#23. However, when passing through Root the only doc directives that flow up to the Grammar scope are those with .fileScope = true. Then when flowing back down, those with .fileScope = false are re-added in front of grammar scope directives in downDocConfig at silver:compiler:extension:doc:core/Root.sv#23 (and stored on the Root as localDocConfig at silver:compiler:extension:doc:core/Root.sv#29.)


inherited attribute downDocConfig :: [DocConfigSetting]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 23.

Final doc config flowing back down, inside files (Roots) will include file scoped settings first.


monoid attribute upDocConfig :: [DocConfigSetting]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 26.

Doc config information flowing up. File scoped settings are stripped at the Root level.


synthesized attribute localDocConfig :: [DocConfigSetting]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 29.

Snapshot of downDocConfig at silver:compiler:extension:doc:core/Root.sv#23 stored on Root.


monoid attribute docDcls :: [Pair<String DocDclInfo>]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 38.

Declarations of documented AGDcls, flowing up. Used for linking and counting documented items. Flows back down as docEnv at silver:compiler:extension:doc:core/Root.sv#41.


inherited attribute docEnv :: tm:Map<String DocDclInfo>

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 41.

Environment of all documented AGDcls, flowing back down after being computed from docDcls at silver:compiler:extension:doc:core/Root.sv#38.


monoid attribute docErrors :: [Message]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 46.

Errors arising from ill-formed doc comments.


synthesized attribute allFileDocErrors :: [(String,[Message])]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 53.

All file names in a grammar, paired with their documentation-related error messages.


WARNING!
INTENDED TO BE INTERFERED WITH like .pp.

WARNING!
INTENDED TO BE INTERFERED WITH like .pp.

fun getFreeTypeNames   ([String] ::= l::[TyVar] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocumentedAGDcl.sv line 25.

(Undocumented.)


fun getFirstAGDcl   (Decorated AGDcl ::= a::Decorated AGDcl )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocumentedAGDcl.sv line 32.

(Undocumented.)


aspect default production top::ClassBodyItem ::= {#aspect_default_production_silver:compiler:definition:core:ClassBodyItem}

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/TypeClassDcls.sv line 52.

(Undocumented.)


concrete production documentedClassBodyItem   (top::ClassBodyItem ::= comment::DocComment_t item::ClassBodyItem )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/TypeClassDcls.sv line 62.

(Undocumented.)


aspect default production top::InstanceBodyItem ::= {#aspect_default_production_silver:compiler:definition:core:InstanceBodyItem}

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/TypeClassDcls.sv line 131.

(Undocumented.)


concrete production documentedInstanceBodyItem   (top::InstanceBodyItem ::= comment::DocComment_t item::InstanceBodyItem )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/TypeClassDcls.sv line 141.

(Undocumented.)


synthesized attribute argNames :: [String]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/ArgNames.sv line 3.

(Undocumented.)


terminal AtSign_t

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Terminals.sv line 3.

(Undocumented.)


terminal DocComment_t

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Terminals.sv line 5.

(Undocumented.)


synthesized attribute body :: String

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 3.

(Undocumented.)


synthesized attribute stub :: Boolean

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 4.

(Undocumented.)


synthesized attribute docNames :: [String]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 5.

(Undocumented.)


synthesized attribute undocNames :: [String]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 6.

(Undocumented.)


nonterminal CommentItem

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 7.

(Undocumented.)


fun sanitizeAnchor   (String ::= n::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 15.

(Undocumented.)


function makeStub   (String ::= forName::String docUnparse::String grammarName::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 20.

(Undocumented.)


abstract production dclCommentItem   (top::CommentItem ::= forName::String docUnparse::String grammarName::String body::Decorated DclComment )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 29.

(Undocumented.)


abstract production standaloneDclCommentItem   (top::CommentItem ::= body::Decorated DclComment )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 40.

(Undocumented.)


abstract production undocumentedItem   (top::CommentItem ::= forName::String docUnparse::String grammarName::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 50.

(Undocumented.)


fun mkUndocumentedItem   (CommentItem ::= f::String t::Decorated AGDcl )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/CommentItem.sv line 60.

(Undocumented.)


fun silverToMdFilename   (String ::= fileName::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/RootSpec.sv line 32.

(Undocumented.)


function formatFile   ([Pair<String String>] ::= fileName::String title::String weight::Integer skipIfEmpty::Boolean pfxText::String comments::[CommentItem] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/RootSpec.sv line 61.

(Undocumented.)


fun lastPart   (String ::= s::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/RootSpec.sv line 91.

(Undocumented.)


abstract production splitConfig   (DocConfigSetting ::= v::Boolean )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 8.

(Undocumented.)


abstract production fileSplitConfig   (DocConfigSetting ::= v::Boolean )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 9.

(Undocumented.)


abstract production weightConfig   (DocConfigSetting ::= v::Integer )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 10.

(Undocumented.)


abstract production grammarWeightConfig   (DocConfigSetting ::= v::Integer )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 11.

(Undocumented.)


abstract production grammarTitleConfig   (DocConfigSetting ::= v::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 12.

(Undocumented.)


abstract production titleConfig   (DocConfigSetting ::= v::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 13.

(Undocumented.)


abstract production grammarNoDocsConfig   (DocConfigSetting ::= v::Boolean )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 14.

(Undocumented.)


abstract production fileNoDocsConfig   (DocConfigSetting ::= v::Boolean )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 15.

(Undocumented.)


abstract production tocConfig   (DocConfigSetting ::= v::Boolean )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 16.

(Undocumented.)


fun doesExcludeFile   (Boolean ::= args::[DocConfigSetting] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 39.

(Undocumented.)


fun getFileTitle   (String ::= args::[DocConfigSetting] fallback::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 47.

(Undocumented.)


fun getGrammarTitle   (String ::= args::[DocConfigSetting] fallback::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 54.

(Undocumented.)


fun getFileWeight   (Integer ::= args::[DocConfigSetting] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 61.

(Undocumented.)


fun getGrammarWeight   (Integer ::= args::[DocConfigSetting] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 68.

(Undocumented.)


fun getSplit   (Boolean ::= args::[DocConfigSetting] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 75.

(Undocumented.)


fun getToc   (Boolean ::= args::[DocConfigSetting] )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DocConfig.sv line 83.

(Undocumented.)


concrete production documentedConsDataConstructor   (top::DataConstructors ::= h::DataConstructor comment::DocComment_t '|' t::DataConstructors )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DataDcl.sv line 31.

(Undocumented.)


concrete production documentedConstructor   (top::DataConstructor ::= comment::DocComment_t item::DataConstructor )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/DataDcl.sv line 48.

(Undocumented.)


synthesized attribute genFiles (collection)

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 5.

(Undocumented.)


synthesized attribute undocumentedNamed :: [String]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 31.

(Undocumented.)


synthesized attribute documentedNamed :: [String]

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 32.

(Undocumented.)


aspect default production top::AGDcl ::= {#aspect_default_production_silver:compiler:definition:core:AGDcl}

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Root.sv line 87.

(Undocumented.)


synthesized attribute docUnparse :: String

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/AGDcl.sv line 14.

(Undocumented.)


synthesized attribute docForName :: String

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/AGDcl.sv line 16.

(Undocumented.)


nonterminal DocDclInfo

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Environment.sv line 1.

(Undocumented.)


synthesized attribute scopedName :: String

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Environment.sv line 5.

(Undocumented.)


abstract production docDclInfo   (top::DocDclInfo ::= id::String )

Contained in grammar [silver:compiler:extension:doc:core]. Defined at silver/compiler/extension/doc/core/Environment.sv line 7.

(Undocumented.)