codegen

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: BSD-3-Clause Imports: 6 Imported by: 5

Documentation

Overview

Package codegen implements utilities for VDL code generators. Code generators for specific languages live in sub-directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Import

type Import struct {
	Name string // Name of the import; may be empty.
	Path string // Path of the imported package; e.g. "v.io/x/ref/lib/vdl/testdata/arith"

	// Local name that refers to the imported package; either the non-empty import
	// name, or the name of the imported package.
	Local string
}

Import represents a single package import.

type Imports

type Imports []Import

Imports is a collection of package imports. REQUIRED: The imports must be sorted by path.

func ImportsForFiles

func ImportsForFiles(files ...*compile.File) Imports

ImportsForFiles returns the imports required for the given files.

func ImportsForValue

func ImportsForValue(v *vdl.Value, pkgPath string) Imports

ImportsForValue returns the imports required to represent the given value v, from within the given pkgPath. It requires that type names used in v are of the form "PKGPATH.NAME".

func (Imports) LookupLocal

func (x Imports) LookupLocal(pkgPath string) string

LookupLocal returns the local name that identifies the given pkgPath.

Directories

Path Synopsis
Package golang implements Go code generation from compiled VDL packages.
Package golang implements Go code generation from compiled VDL packages.
Package java implements Java code generation from compiled VDL packages.
Package java implements Java code generation from compiled VDL packages.
Package javascript implements Javascript code generation from compiled VDL packages.
Package javascript implements Javascript code generation from compiled VDL packages.
Package json implements JSON generation for VDL const values.
Package json implements JSON generation for VDL const values.
Package swift implements Swift code generation from compiled VDL packages.
Package swift implements Swift code generation from compiled VDL packages.
Package vdlgen implements VDL code generation from compiled VDL packages.
Package vdlgen implements VDL code generation from compiled VDL packages.

Jump to

Keyboard shortcuts

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