@@ -23,15 +23,14 @@ type DocEntry struct {
2323 HasSection bool
2424}
2525
26+ //lion:implementation section="Extraction pipeline"
2627// Extraction pipeline:
2728// - Walks all .go files under the directory, skipping *_test.go.
2829// - Parses with comments and pulls lion markers from package doc, func doc, type/const/var
2930// doc comments, and inline comments inside functions and other declarations (first name in a
3031// const/var block is used as the entity).
3132// - Supports single-line markers and block comment markers (marker at top of the doc block).
3233// - Aggregates snippets per topic across files; generator writes one file per topic.
33- //
34- //lion:implementation section="Extraction pipeline"
3534func Extract (dir string ) (map [string ][]DocEntry , error ) {
3635 docs := make (map [string ][]DocEntry )
3736 fset := token .NewFileSet ()
@@ -157,6 +156,7 @@ func determineEntityForComment(cg *ast.CommentGroup, file *ast.File, funcDecls [
157156 return "package " + file .Name .Name
158157}
159158
159+ //lion:supported-syntax section="Supported syntax"
160160// Supported syntax formats:
161161//
162162// 1. Single-line marker first:
@@ -174,9 +174,6 @@ func determineEntityForComment(cg *ast.CommentGroup, file *ast.File, funcDecls [
174174// - Unknown keys stop metadata parsing and are treated as content.
175175//
176176// All formats attach documentation to the next declaration (function, type, const, var).
177- //
178- //lion:supported-syntax section="Supported syntax"
179- //lion:supported-syntax section="Supported syntax"
180177func extractFromCommentGroup (fset * token.FileSet , cg * ast.CommentGroup , filepath , entityName string , docs map [string ][]DocEntry ) error {
181178 topicGroups := make (map [string ][]string )
182179 topicOrder := []string {}
0 commit comments