clang

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TEMP_FILE = "temp.h"

Variables

This section is empty.

Functions

func BuildScopingParts

func BuildScopingParts(cursor clang.Cursor) []string

Traverse up the semantic parents

func CreateTranslationUnit

func CreateTranslationUnit(config *Config) (*clang.Index, *clang.TranslationUnit, error)

func GetInclusions

func GetInclusions(unit *clang.TranslationUnit, visitor InclusionVisitor)

func GetLocation

func GetLocation(loc clang.SourceLocation) (file clang.File, line c.Uint, column c.Uint, offset c.Uint)

func GetPresumedLocation added in v0.5.1

func GetPresumedLocation(loc clang.SourceLocation) (fileGo string, line c.Uint, column c.Uint)

func VisitChildren

func VisitChildren(cursor clang.Cursor, fn Visitor) c.Uint

Types

type Config

type Config struct {
	File    string
	Temp    bool
	Args    []string
	IsCpp   bool
	Index   *clang.Index
	Options c.Uint
}

type InclusionVisitor

type InclusionVisitor func(included_file clang.File, inclusions []clang.SourceLocation)

type Visitor

type Visitor func(cursor, parent clang.Cursor) clang.ChildVisitResult

Jump to

Keyboard shortcuts

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