parser

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeParser

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

CodeParser handles code parsing

func NewCodeParser

func NewCodeParser(enabled bool) *CodeParser

NewCodeParser creates a new code parser

func (*CodeParser) GetContext

func (p *CodeParser) GetContext(content []byte, lineNum int, contextLines int) string

GetContext extracts context around a line number

func (*CodeParser) ParseFile

func (p *CodeParser) ParseFile(filePath string, content []byte) (*ParsedCode, error)

ParseFile parses a file and extracts code structure

type ParsedCode

type ParsedCode struct {
	Language  string
	Functions []string
	Strings   []string
	Variables []string
	Comments  []string
	IsTest    bool
	Imports   []string
}

ParsedCode represents parsed code structure

Jump to

Keyboard shortcuts

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