cl

package
v1.1.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Overview

Package cl compiles Go+ syntax trees (ast).

Index

Constants

View Source
const (
	DbgFlagLoad = 1 << iota
	DbgFlagLookup
	DbgFlagAll = DbgFlagLoad | DbgFlagLookup
)

Variables

This section is empty.

Functions

func NewPackage added in v0.7.0

func NewPackage(pkgPath string, pkg *ast.Package, conf *Config) (p *gox.Package, err error)

NewPackage creates a Go+ package instance.

func SetDebug added in v1.0.0

func SetDebug(flags int)

func SetDisableRecover added in v1.0.0

func SetDisableRecover(disableRecover bool)

Types

type Class added in v1.1.0

type Class = modfile.Classfile

type Config added in v0.9.0

type Config struct {
	// WorkingDir is the directory in which to run gop compiler.
	WorkingDir string

	// TargetDir is the directory in which to generate Go files.
	TargetDir string

	// Fset provides source position information for syntax trees and types.
	// If Fset is nil, Load will use a new fileset, but preserve Fset's value.
	Fset *token.FileSet

	// LookupClass lookups a class by specified file extension.
	LookupClass func(ext string) (c *Class, ok bool)

	// An Importer resolves import paths to Packages.
	Importer types.Importer

	// NoFileLine = true means not to generate file line comments.
	NoFileLine bool

	// RelativePath = true means to generate file line comments with relative file path.
	RelativePath bool
}

Config of loading Go+ packages.

type Errors added in v0.9.2

type Errors struct {
	Errs []error
}

func (*Errors) Error added in v0.9.2

func (p *Errors) Error() string

Directories

Path Synopsis
internal
spx

Jump to

Keyboard shortcuts

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