Help us shape the future of Go! Take the 2026 Go Developer Survey

parser

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser handles parsing files for BARK comments

func NewParser

func NewParser() *Parser

NewParser creates a new parser with the language registry

func (*Parser) GetRegistry

func (p *Parser) GetRegistry() *Registry

GetRegistry returns the language registry

func (*Parser) ParseFile

func (p *Parser) ParseFile(filePath string) ([]results.Finding, error)

ParseFile parses a file and returns findings

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry holds all supported languages

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new language registry with all supported languages

func (*Registry) GetLanguageByExtension

func (r *Registry) GetLanguageByExtension(ext string) (*languages.Language, bool)

GetLanguageByExtension returns the language for a given file extension

func (*Registry) GetLanguageByFilename

func (r *Registry) GetLanguageByFilename(filePath string) (*languages.Language, bool)

GetLanguageByFilename returns the language for a given file path It first tries extension lookup (fast), then falls back to filename pattern matching

func (*Registry) GetLanguages

func (r *Registry) GetLanguages() []languages.Language

GetLanguages returns all supported languages

func (*Registry) GetSupportedExtensions

func (r *Registry) GetSupportedExtensions() []string

GetSupportedExtensions returns all supported file extensions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL