parse

package
v0.0.0-...-77fc93b Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PackageModule

func PackageModule(module []byte) (pkg string, mod string, moduleContent string, err error)

PackageModule parses the input file and returns the first module it finds. `#[test_only]` modules will be filtered out

Types

type Const

type Const struct {
	Name  string
	Type  string
	Value string
}

func Consts

func Consts(module []byte) ([]Const, error)

type ExternalStruct

type ExternalStruct struct {
	ImportPath string

	Package string
	Module  string
	Name    string
}

type Func

type Func struct {
	IsView  bool
	IsEntry bool

	Name        string
	Params      []Param
	ReturnTypes []string
}

func Functions

func Functions(module []byte) ([]Func, error)

type Param

type Param struct {
	Name string
	Type string
}

type Struct

type Struct struct {
	IsEvent bool

	Name   string
	Fields []Param
}

func Structs

func Structs(module []byte) ([]Struct, error)

Jump to

Keyboard shortcuts

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