arguments

package
v0.0.0-...-670eaf5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOutput      = "output.json"
	DefaultMode        = mode.Executable
	DefaultProgramName = "xlogic-compiler"
)

These constants define default values for compiler arguments.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	Append    bool                `arg:"-a,--append" help:"Append file"`
	Mode      mode.Mode           `arg:"-m,--mode" help:"Compiler mode: object, archive, library, executable" default:"executable"`
	Output    path.Path           `arg:"-o,--output" help:"Place output in file" default:"output.json" placeholder:"FILE"`
	Compilers []string            `arg:"-c,--compiler" help:"Compiler name or path" placeholder:"COMPILER"`
	Defines   []define.Define     `arg:"-D,--define,separate" help:"Set preprocessor define" placeholder:"NAME[=VALUE]"`
	Undefines []undefine.Undefine `arg:"-U,--undefine,separate" help:"Unset preprocessor define" placeholder:"NAME"`
	Headers   []header.Header     `arg:"-H,--header,separate" help:"Include header file" placeholder:"FILE"`
	Includes  []include.Include   `arg:"-I,--include,separate" help:"Directory to search for includes" placeholder:"DIR"`
	Files     []file.File         `arg:"positional" help:"Input files" placeholder:"FILE"`
}

Arguments defines compiler arguments.

func New

func New() *Arguments

New creates a new compiler arguments object.

func (*Arguments) Parse

func (a *Arguments) Parse(args ...string) (err error)

Parse parses arguments.

Jump to

Keyboard shortcuts

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