tarus_compiler

package
v0.0.0-...-5379b69 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompileTargetUnknown = iota
	CompileTargetDefault

	CompileTargetBinary
	CompileTargetPythonBinary

	CompileTargetLanguageC
	CompileTargetLanguageCpp
	CompileTargetLanguageDelphi
	CompileTargetLanguageJava
	CompileTargetLanguageJavascript
	CompileTargetLanguageCSharp
	CompileTargetLanguageFSharp
	CompileTargetLanguageGolang
	CompileTargetLanguageHaskell
	CompileTargetLanguageKotlin
	CompileTargetLanguageNodeJs
	CompileTargetLanguageOCaml
	CompileTargetLanguagePascal
	CompileTargetLanguagePerl
	CompileTargetLanguagePhp
	CompileTargetLanguagePython
	CompileTargetLanguagePython2
	CompileTargetLanguagePython3
	CompileTargetLanguageRuby
	CompileTargetLanguageRust
	CompileTargetLanguageScala
	CompileTargetLanguageSwift
	CompileTargetLanguageTypescript
)

Variables

View Source
var Statics = &StaticRouter{}

Functions

func CompileTargetToMime

func CompileTargetToMime(c int) string

func ExtToCompileTarget

func ExtToCompileTarget(ext string) int

func MimeToCompileTarget

func MimeToCompileTarget(s string) int

Types

type Compiler

type Compiler interface {
	Compile(args *CompilerArgs) (CompilerResponse, error)
}

type CompilerArgs

type CompilerArgs struct {
	CompileTarget int
	CompiledRole  string
	Workdir       string
	Args          []string
	// Note: map might be initialized as null
	ExtraArgs    map[string]string
	Environments map[string]string
}

type CompilerResponse

type CompilerResponse struct {
	DiagPage    string
	ExitSummary int
}

type CompilerSerial

type CompilerSerial struct {
	Compiler
	Major    int
	Minor    int
	Version  string
	Features [][2]string
}

type MultiVerCompiler

type MultiVerCompiler struct {
	SystemToolchain CompilerSerial
	Toolchains      map[int][]CompilerSerial
}

func GetSystemClang

func GetSystemClang() *MultiVerCompiler

func GetSystemGnu

func GetSystemGnu() *MultiVerCompiler

type StaticRouter

type StaticRouter struct{}

func (*StaticRouter) Compile

func (s *StaticRouter) Compile(args *CompilerArgs) (CompilerResponse, error)

Jump to

Keyboard shortcuts

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