parser

package
v0.0.0-...-2d69983 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package parser parses Go code and keeps track of all the types defined and provides access to all the constants defined for an int type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	Name string
	// contains filtered or unexported fields
}

A Package contains all the information related to a parsed package.

func ParsePackage

func ParsePackage(directory string) (*Package, error)

ParsePackage parses the package in the given directory and returns it.

func (*Package) FindStructureSpec

func (pkg *Package) FindStructureSpec(typeName string) (result *StructureSpec, err error)

StructureDef is inspect files for the declaration of target structure type ...TODO

func (*Package) ValuesOfType

func (pkg *Package) ValuesOfType(typeName string) ([]string, map[string]bool, error)

ValuesOfType is inspect files for constant value, default variable and methods for type, return a list of the constant values, and map of templates which must be ignored, because they have already been declared.

type StructureSpec

type StructureSpec struct {
	Name   string
	Fields []string
	FTypes map[string]string
	Tags   map[string]string
}

Jump to

Keyboard shortcuts

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