cl

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: Apache-2.0 Imports: 23 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.Class

type Config added in v0.9.0

type Config struct {
	// 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

	// WorkingDir is the directory in which to run gop compiler.
	WorkingDir string

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

	// C2goBase specifies base of standard c2go packages.
	// Default is github.com/goplus/.
	C2goBase string

	// LookupPub lookups the c2go package pubfile (named c2go.a.pub).
	LookupPub func(pkgPath string) (pubfile string, err error)

	// LookupClass lookups a class by specified file extension.
	LookupClass func(ext string) (c *Project, 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

	// NoAutoGenMain = true means not to auto generate main func is no entry.
	NoAutoGenMain bool

	// NoSkipConstant = true means disable optimization of skip constants
	NoSkipConstant bool
}

Config of loading Go+ packages.

type Project added in v1.1.6

type Project = modfile.Project

Directories

Path Synopsis
internal
spx

Jump to

Keyboard shortcuts

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