ir

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(buf *bytes.Buffer, ident int, ast interface{})

Format converts a syntax tree back to the input syntax.

func ToString

func ToString(ast interface{}) string

ToString converts a syntax tree back to the input syntax, using Format()

Types

type EnumItem

type EnumItem struct {
	Name parser.ItemName
	Tag  parser.Tag
}

EnumItem represents an enumeration constant.

type EnumType

type EnumType struct {
	Items []EnumItem
}

EnumType represents an anonymous enumeration.

type NamedType

type NamedType struct {
	Name parser.TypeName
	// Type is nil for primitive types.
	Type Type
}

NamedType represents a type definition.

func (*NamedType) String

func (t *NamedType) String() string

type StructItem

type StructItem struct {
	Name    parser.ItemName
	IsSlice bool
	Type    *NamedType
	Tag     parser.Tag
}

StructItem represents a struct field.

type StructType

type StructType struct {
	Items []StructItem
}

StructType represents an anonymous struct.

type SumItem

type SumItem struct {
	Type *NamedType
	Tag  parser.Tag
}

SumItem represents a sum alternative.

type SumType

type SumType struct {
	Items []SumItem
}

SumType represents an anonymous sum.

type Type

type Type interface {
	// contains filtered or unexported methods
}

Type represents an anonymous type of any kind.

Jump to

Keyboard shortcuts

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