parser

package
v0.0.0-...-7fce627 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JavaScriptStringType = "string"
	JavaScriptNumberType = "number"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportComment

type ExportComment struct {
	// The symbol the export comment refers to
	Symbol string
}

type ExportedFunction

type ExportedFunction struct {
	Name       string
	Params     []ExportedFunctionParam
	Doc        string
	ReturnType string
}

func (ExportedFunction) String

func (f ExportedFunction) String() string

type ExportedFunctionParam

type ExportedFunctionParam struct {
	Name string
	Type string
}

type ParsedExportedFunctions

type ParsedExportedFunctions struct {
	Functions []ExportedFunction
}

type Parser

type Parser struct {
}

func New

func New() (*Parser, error)

func (*Parser) Parse

func (p *Parser) Parse(filePath string, reader io.Reader) ([]*ExportedFunction, error)

func (*Parser) ParseFuncDecl

func (p *Parser) ParseFuncDecl(funcDecl *ast.FuncDecl) (*ExportedFunction, error)

Jump to

Keyboard shortcuts

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