v.io: v.io/x/ref/lib/vdl/codegen Index | Files | Directories

package codegen

import "v.io/x/ref/lib/vdl/codegen"

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

Index

Package Files

import.go

type Import Uses

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 Uses

type Imports []Import

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

func ImportsForFiles Uses

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

ImportsForFiles returns the imports required for the given files.

func ImportsForValue Uses

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 Uses

func (x Imports) LookupLocal(pkgPath string) string

LookupLocal returns the local name that identifies the given pkgPath.

Directories

PathSynopsis
golangPackage golang implements Go code generation from compiled VDL packages.
javaPackage java implements Java code generation from compiled VDL packages.
javascriptPackage javascript implements Javascript code generation from compiled VDL packages.
jsonPackage json implements JSON generation for VDL const values.
swiftPackage swift implements Swift code generation from compiled VDL packages.
vdlgenPackage vdlgen implements VDL code generation from compiled VDL packages.

Package codegen imports 6 packages (graph) and is imported by 4 packages. Updated 2020-10-22. Refresh now. Tools for package owners.