cpp

package
v0.15.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTestFile

func IsTestFile(filePath string) bool

IsTestFile reports whether the given C++ path is a test file.

func ResolveCppIncludePath

func ResolveCppIncludePath(sourceFile, includePath string, suppliedFiles map[string]bool) []string

ResolveCppIncludePath resolves a C++ include path to possible file paths.

func ResolveCppProjectIncludes

func ResolveCppProjectIncludes(
	absPath string,
	filePath string,
	suppliedFiles map[string]bool,
	contentReader vcs.ContentReader,
) ([]string, error)

Types

type Include

type Include struct {
	Path string
	Kind IncludeKind
}

Include represents a C++ include directive.

func CppIncludes

func CppIncludes(filePath string) ([]Include, error)

CppIncludes parses a C++ file and returns its includes.

func ParseCppIncludes

func ParseCppIncludes(sourceCode []byte) ([]Include, error)

ParseCppIncludes parses C++ source code and extracts includes.

type IncludeKind

type IncludeKind int

IncludeKind distinguishes between system and local includes.

const (
	IncludeLocal IncludeKind = iota
	IncludeSystem
)

type Module

type Module struct{}

func (Module) Extensions

func (Module) Extensions() []string

func (Module) IsTestFile

func (Module) IsTestFile(filePath string, _ vcs.ContentReader) bool

func (Module) Maturity

func (Module) Maturity() moduleapi.MaturityLevel

func (Module) Name

func (Module) Name() string

func (Module) NewResolver

func (Module) NewResolver(ctx *moduleapi.Context, contentReader vcs.ContentReader) moduleapi.Resolver

Jump to

Keyboard shortcuts

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