Documentation
¶
Overview ¶
Package docparse parses structured metadata from Guile-style docstrings.
Docstrings may contain metadata sections (Syntax:, Parameters:, Returns:, Category:, Keywords:) that are extracted into structured fields, and prose sections (Examples:, See also:) that remain in the Doc text.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseValueType ¶
func ParseValueType(name string) values.TypeConstraint
ParseValueType converts a Scheme-style type name to a TypeConstraint. Known names return the corresponding ValueType constant. Unknown names return a NamedTypeConstraint preserving the original name. Empty names return nil (unspecified).
Types ¶
type DocInfo ¶
type DocInfo struct {
Doc string
Syntax string // extracted from "Syntax: ..." line
ParamNames []string
ParamTypes []values.TypeConstraint
ReturnType values.TypeConstraint
Category string
Keywords []string
}
DocInfo holds structured metadata extracted from a docstring.
func ParseDocstring ¶
ParseDocstring parses a raw docstring into structured metadata. Metadata sections (Syntax:, Parameters:, Returns:, Category:, Keywords:) are extracted into typed fields. Prose sections (Examples:, See also:) remain in the Doc text.
func (DocInfo) HasStructuredMetadata ¶
HasStructuredMetadata reports whether any structured metadata was extracted.