include

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package include resolves Pawn include directives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate added in v0.1.5

type Candidate struct {
	Path      string
	Directory bool
}

Candidate is an include path offered by an editor.

type Resolver

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

Resolver searches a fixed, ordered list of include roots.

func New

func New(fsys fsx.FS, roots []string) *Resolver

New builds a Resolver from ordered, absolute roots.

func NewWithQuotedRoots added in v0.1.1

func NewWithQuotedRoots(fsys fsx.FS, roots, quotedRoots []string) *Resolver

NewWithQuotedRoots adds roots used only by quoted includes.

func (*Resolver) Complete added in v0.1.5

func (r *Resolver) Complete(fromFile, prefix string, quoted bool, limit int) []Candidate

Complete lists include paths below the typed prefix.

func (*Resolver) Resolve

func (r *Resolver) Resolve(fromFile, spec string, quoted bool) (string, bool)

Resolve finds spec from fromFile. Quoted includes search the source directory first. Missing extensions are retried with ".inc".

func (*Resolver) ResolveAll added in v0.1.7

func (r *Resolver) ResolveAll(fromFile, spec string, quoted bool) []string

ResolveAll returns matching include paths in search order.

func (*Resolver) Roots

func (r *Resolver) Roots() []string

Roots returns the configured search path.

Jump to

Keyboard shortcuts

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