Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffLine ¶
type DiffLine struct {
Type LineType
Content string
LineNo1 int // Line number in file 1 (0 if not applicable)
LineNo2 int // Line number in file 2 (0 if not applicable)
Highlights []Highlight
}
DiffLine represents a single line in the diff
type DiffResult ¶
type DiffResult struct {
Lines []DiffLine
File1Name string
File2Name string
File1Lines []string
File2Lines []string
}
DiffResult contains the results of a diff operation
func (*DiffResult) GetStats ¶
func (r *DiffResult) GetStats() (added, removed, unchanged int)
GetStats returns statistics about the diff
func (*DiffResult) HasChanges ¶
func (r *DiffResult) HasChanges() bool
HasChanges returns true if there are any differences
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine handles diff operations
type EngineOptions ¶
type EngineOptions struct {
Language string
IgnoreWhitespace bool
IgnorePatterns []string
TokenPatterns map[string]string
}
EngineOptions controls diff behavior.
type RegexTokenizer ¶
type RegexTokenizer struct {
// contains filtered or unexported fields
}
RegexTokenizer tokenizes text using a regular expression.
func NewRegexTokenizer ¶
func NewRegexTokenizer(pattern string) *RegexTokenizer
NewRegexTokenizer compiles a regex tokenizer.
func (*RegexTokenizer) Tokenize ¶
func (r *RegexTokenizer) Tokenize(line string) []Token
Tokenize splits the line using the configured regex and records rune offsets.
Click to show internal directories.
Click to hide internal directories.