php

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PHPDocInfo

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

PHPDocInfo stores parsed PHPDoc information

type Processor

type Processor struct {
	processor.BaseProcessor
	// contains filtered or unexported fields
}

Processor implements the LanguageProcessor interface for PHP

func NewProcessor

func NewProcessor() *Processor

NewProcessor creates a new PHP language processor

func (*Processor) EnableTreeSitter

func (p *Processor) EnableTreeSitter()

EnableTreeSitter enables tree-sitter based parsing

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, reader io.Reader, filename string) (*ir.DistilledFile, error)

Process parses PHP source code and returns the IR representation

func (*Processor) ProcessFile

func (p *Processor) ProcessFile(filename string, opts processor.ProcessOptions) (*ir.DistilledFile, error)

ProcessFile processes a file by path

func (*Processor) ProcessWithOptions

func (p *Processor) ProcessWithOptions(ctx context.Context, reader io.Reader, filename string, opts processor.ProcessOptions) (*ir.DistilledFile, error)

ProcessWithOptions parses with specific options

type TreeSitterProcessor

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

TreeSitterProcessor processes PHP using tree-sitter

func NewTreeSitterProcessor

func NewTreeSitterProcessor() (*TreeSitterProcessor, error)

NewTreeSitterProcessor creates a new tree-sitter based processor

func (*TreeSitterProcessor) Close

func (p *TreeSitterProcessor) Close() error

Close cleans up resources

func (*TreeSitterProcessor) ProcessSource

func (p *TreeSitterProcessor) ProcessSource(ctx context.Context, source []byte, filename string) (*ir.DistilledFile, error)

ProcessSource processes PHP source code using tree-sitter

Jump to

Keyboard shortcuts

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