MCPcopy Index your code
hub / github.com/php/frankenphp / collectExportDirectives

Method collectExportDirectives

internal/extgen/classparser.go:103–119  ·  view source on GitHub ↗
(node *ast.File, fset *token.FileSet)

Source from the content-addressed store, hash-verified

101}
102
103func (cp *classParser) collectExportDirectives(node *ast.File, fset *token.FileSet) []exportDirective {
104 var directives []exportDirective
105
106 for _, commentGroup := range node.Comments {
107 for _, comment := range commentGroup.List {
108 if matches := phpClassRegex.FindStringSubmatch(comment.Text); matches != nil {
109 pos := fset.Position(comment.Pos())
110 directives = append(directives, exportDirective{
111 line: pos.Line,
112 className: matches[1],
113 })
114 }
115 }
116 }
117
118 return directives
119}
120
121func (cp *classParser) extractPHPClassCommentWithLine(commentGroup *ast.CommentGroup, fset *token.FileSet) (string, int) {
122 if commentGroup == nil {

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected