core

package
v0.0.0-...-be3c4a6 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LanguageAdapter

type LanguageAdapter interface {
	// Language returns the language identifier (e.g., "go")
	Language() string

	// Parse parses the source code and extracts comments
	// file: the file path (used for ID generation context)
	// src: the source code content (if nil, read from file)
	Parse(file string, src []byte) ([]*domain.Comment, error)
}

LanguageAdapter defines the interface for language-specific AST parsers

type Translator

type Translator interface {
	// Translate translates the text from source language to target language
	Translate(ctx context.Context, text, from, to string) (string, error)

	// TranslateBatch translates a batch of texts (optional optimization)
	TranslateBatch(ctx context.Context, texts []string, from, to string) ([]string, error)
}

Translator defines the interface for translation services

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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