consteval

package
v0.0.0-...-27647ab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

var foo = ce.Const("foo", func() int {
	return 2 + 3
})
type thunk struct {
	o sync.Once
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	T TypeName
	S []Value
	// contains filtered or unexported fields
}

type Basic

type Basic struct {
	K BasicKind
	S string
	// contains filtered or unexported fields
}

type BasicKind

type BasicKind int8
const (
	BoolBasic BasicKind = iota
	IntBasic
	FloatBasic
	ImagBasic
	CharBasic
	StringBasic
)

func (BasicKind) Ast

func (k BasicKind) Ast() token.Token

func (BasicKind) String

func (k BasicKind) String() string

type Call

type Call struct {
	N string
	G []TypeName
	A []Value
	// contains filtered or unexported fields
}

type Dynamic

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

type Lookup

type Lookup interface {
	Lookup(n string) any // Value | ast.Node | error
}

type Map

type Map struct {
	KT,
	VT TypeName
	S []MapEntry
	// contains filtered or unexported fields
}

type MapEntry

type MapEntry struct {
	K,
	V Value
}

type NameError

type NameError struct {
	N string
}

func (NameError) Error

func (e NameError) Error() string

type Nil

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

type Scope

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

func ScopeFromAst

func ScopeFromAst(a *ast.Scope) *Scope

type Struct

type Struct struct {
	T TypeName
	M map[string]Value
	// contains filtered or unexported fields
}

type Type

type Type struct {
	T TypeName
	// contains filtered or unexported fields
}

type TypeError

type TypeError struct {
	S []string
}

func (TypeError) Error

func (e TypeError) Error() string

type TypeName

type TypeName string

type Value

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

Jump to

Keyboard shortcuts

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