deepparser

package
v0.0.0-...-9455615 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	Import   godetector.Import
	Decl     *ast.GenDecl
	Type     *ast.TypeSpec
	TypeName string
	FS       *token.FileSet
	FileDir  string
	File     *ast.File
}

func (*Definition) StructFields

func (def *Definition) StructFields() []*StField

type StField

type StField struct {
	Name      string
	Type      string
	Tag       string
	Comment   string
	AST       *ast.Field
	Omitempty bool
}

type TypeScript

type TypeScript struct {
	Typer
}

func (*TypeScript) MapField

func (tsg *TypeScript) MapField(st *StField) string

func (*TypeScript) MapType

func (tsg *TypeScript) MapType(t ast.Expr) string

type Typer

type Typer struct {
	Ordered []*Definition
	Parsed  map[string]*Definition
}

func (*Typer) Add

func (tsg *Typer) Add(def *Definition)

func (*Typer) AddFromDir

func (tsg *Typer) AddFromDir(typeName string, dir string)

func (*Typer) AddFromFile

func (tsg *Typer) AddFromFile(typeName string, filename string)

func (*Typer) AddFromImport

func (tsg *Typer) AddFromImport(typeName string, importPath string)

Jump to

Keyboard shortcuts

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