link

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package link links implements a linker for corgi files. It resolves imports and links mixin calls. Furthermore, it validates that there are no namespace collisions from uses or from redeclared namespaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Linker

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

func New

func New(loader load.Loader) *Linker

New creates a new *Linker that uses the passed load.

func (*Linker) LinkFile

func (l *Linker) LinkFile(f *file.File) error

LinkFile concurrently links the passed file.

It expects the passed file to have passed [validate.PreLink] and have a linked DirLibrary, or none at all.

If it returns an error, that error will be of type corgierr.List.

func (*Linker) LinkLibrary

func (l *Linker) LinkLibrary(lib *file.Library) error

LinkLibrary concurrently links the passed library.

It expects all files in the passed library to have passed [validate.PreLink].

If it returns an error, that error will be of type corgierr.List.

Jump to

Keyboard shortcuts

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