test

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

AST Structure

AST Objects have the following structure.

ast.File
  ast.GenDecl
    ast.CommentGroup
    ast.TypeSpec
      ast.Ident (the struct)
      ast.StructType
        ast.FieldList
          ast.Field
            (Primitive)
            ast.CommentGroup
            []ast.Ident
              ast.Ident
                ast.Object (nil)
            ast.Ident (Name e.g. int)
          ast.Field
            (Obj)
            ast.CommentGroup
            []ast.Ident
              ast.Ident
                ast.Object (Name)
              ast.Ident
                ast.Object
                  ast.TypeSpec
                    ast.Ident
                    ast.StructType
                      ast.FieldList
                        ast.Field
                          ast.CommentGroup
                          []ast.Ident
                          ...etc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Animal

type Animal struct {
	Name string
	// Numb of legs
	Legs    int
	Species Species
}

Example comment for animal

type AnotherThing

type AnotherThing struct {
	Foobar string
}

type Blah

type Blah struct {
	Bar string
}

type Kingdom

type Kingdom struct {
	// Some animal type.
	Animal Animal
	// Name represents the Kingdoms name.
	Name    string
	Plants  []Plant
	SomeInt []int64
}

This is the root struct Second line for rootstruct

type LeaveType

type LeaveType struct {
	Color  string
	Color2 string
}

type MiniPlant

type MiniPlant struct {
	PlantType    string
	LeaveTypes   []LeaveType
	AnotherThing AnotherThing
	StrangeMap   map[string]Blah
}

type Plant

type Plant struct {
	Ipsom     string
	Color     []string
	MiniPlant MiniPlant
}

type SecondRootStruct

type SecondRootStruct struct {
	Name string
}

This is another root struct

type Species

type Species struct {
	Something map[string]any
	Continent string
	IsExtinct bool
}

Jump to

Keyboard shortcuts

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