macro

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Default

type Default[T any] interface {
	Default() T
}

type Macro

type Macro[T any] struct {
	// contains filtered or unexported fields
}

func MacroI

func MacroI[A, T any](f func(arg A) (*T, error)) Macro[T]

MacroI creates a macro with an argument

func MacroN

func MacroN[T any](f func() (*T, error)) Macro[T]

MacroN creates a macro without an argument

func MacroV

func MacroV[A, T any](f func(args ...A) (*T, error)) Macro[T]

MacroV creates a macro with a variable argument

func (Macro[T]) Parse

func (m Macro[T]) Parse(s string) (*T, error)

func (Macro[T]) Signature

func (m Macro[T]) Signature() string

type MacroMap

type MacroMap[T any] map[string]T

func (MacroMap[T]) Lookup

func (m MacroMap[T]) Lookup(s string) (*T, error)

type UnknownError

type UnknownError struct {
	// contains filtered or unexported fields
}

func (*UnknownError) Error

func (e *UnknownError) Error() string

Jump to

Keyboard shortcuts

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