builder

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: BSD-3-Clause Imports: 17 Imported by: 5

Documentation

Overview

builder package defines the library for invoking the full compilation of Serulian code.

Index

Constants

This section is empty.

Variables

View Source
var CORE_LIBRARY = packageloader.Library{
	PathOrURL: "github.com/serulian/corelib" + version.CoreLibraryTagOrBranch(),
	IsSCM:     true,
	Alias:     "core",
}

CORE_LIBRARY contains the location of the Serulian core library.

Functions

func BuildSource

func BuildSource(rootSourceFilePath string, debug bool, vcsDevelopmentDirectories ...string) bool

BuildSource invokes the compiler starting at the given root source file path.

func OutputErrors

func OutputErrors(errors []compilercommon.SourceError)

func OutputWarnings

func OutputWarnings(warnings []compilercommon.SourceWarning)

Types

type ErrorsSlice

type ErrorsSlice []compilercommon.SourceError

func (ErrorsSlice) Len

func (s ErrorsSlice) Len() int

func (ErrorsSlice) Less

func (s ErrorsSlice) Less(i, j int) bool

func (ErrorsSlice) Swap

func (s ErrorsSlice) Swap(i, j int)

type SourceAndBundle added in v0.3.0

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

SourceAndBundle holds the built ECMAScript source, its source map, and any bundled files.

func GenerateSourceAndBundle added in v0.3.0

func GenerateSourceAndBundle(scopeResult scopegraph.Result) SourceAndBundle

GenerateSourceAndBundle generates the full ECMAScript source for the given scope result, as well as its sourcemap, and any additional bundled files produced by language integrations.

func (SourceAndBundle) BundleWithSource added in v0.3.0

func (sab SourceAndBundle) BundleWithSource(generatedSourceFileName string, sourceRoot string) bundle.Bundle

BundleWithSource returns all files bundled by the generator run, *including* the source file and its source map.

func (SourceAndBundle) BundledFiles added in v0.3.0

func (sab SourceAndBundle) BundledFiles() bundle.Bundle

BundledFiles returns all files bundled by the lang integrations. Note that these do *not* include the generated source or map.

func (SourceAndBundle) Source added in v0.3.0

func (sab SourceAndBundle) Source() string

Source returns the ECMAScript source generated.

func (SourceAndBundle) SourceMap added in v0.3.0

func (sab SourceAndBundle) SourceMap() *sourcemap.SourceMap

SourceMap returns the source map filled for the generated source.

type WarningsSlice

type WarningsSlice []compilercommon.SourceWarning

func (WarningsSlice) Len

func (s WarningsSlice) Len() int

func (WarningsSlice) Less

func (s WarningsSlice) Less(i, j int) bool

func (WarningsSlice) Swap

func (s WarningsSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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