parser

package
v0.0.0-...-02fd228 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package parser turns Go code into model.Code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {

	// TargetPackage is the name or path of the package
	// that becomes the point of view for type names.
	// If empty or the same package, types will not be qualified,
	// otherwise they will include the package name.
	TargetPackage string
	// contains filtered or unexported fields
}

Parser parses source code and generates a model.Code.

func New

func New(src *source.Source) *Parser

New makes a new Generator for the given package (folder) or Go code file. If src is specified as a []byte or io.Reader, it will be used as the source.

func (*Parser) Parse

func (p *Parser) Parse() (*model.Code, error)

Parse parses the source file and returns the model.Code.

Jump to

Keyboard shortcuts

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