parser

package
v1.1.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	Name       string
	Type       types.Type
	Value      interface{}
	Properties Properties
	Expr       ast.Expr
	Position   token.Position
	FnObj      types.Object
}

type Parser

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

func NewParser

func NewParser(pkg *packages.Package) *Parser

func (Parser) Parse

func (p Parser) Parse(expr ast.Expr) (*Option, error)

type Properties

type Properties map[string][]*Option

func (Properties) Get

func (p Properties) Get(key string) (values []*Option)

func (Properties) GetFirst

func (p Properties) GetFirst(key string) (value *Option, ok bool)

Jump to

Keyboard shortcuts

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