parse

package
v0.0.0-...-85e4542 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Elems

func Elems(filename string) ([]gen.Elem, string, error)

GetElems creates a FileSet from a filename or directory and returns copies of the processed elements with initialized variable names.

Types

type FileSet

type FileSet struct {
	Package    string              // package name
	Specs      map[string]ast.Expr // type specs in file
	Identities map[string]gen.Elem // processed from specs
	Directives []string            // raw preprocessor directives
}

A FileSet is the in-memory representation of a parsed file.

func File

func File(name string) (*FileSet, error)

File parses a file at the relative path provided and produces a new *FileSet. (No exported structs is considered an error.) If you pass in a path to a directory, the entire directory will be parsed.

Jump to

Keyboard shortcuts

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