Documentation
¶
Index ¶
- func CoreConsts() *vm.Consts
- func Eval(src string) (vm.Value, error)
- func IsErrorEOF(err error) bool
- func PrecompiledNSChunk(name string) *vm.CodeChunk
- func ReadString(s string) (vm.Value, error)
- func SetMatchCljConditional(v bool)
- type CompileError
- type Context
- func (c *Context) Compile(s string) (*vm.CodeChunk, error)
- func (c *Context) CompileMultiple(reader io.Reader) (*vm.CodeChunk, vm.Value, error)
- func (c *Context) Consts() *vm.Consts
- func (c *Context) CurrentNS() *vm.Namespace
- func (c *Context) SetCurrentNS(ns *vm.Namespace)
- func (c *Context) SetSource(source string) *Context
- type LispReader
- type ReaderError
- type Token
- type TokenKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoreConsts ¶ added in v1.3.0
CoreConsts returns the global const pool populated during core boot. Used as parent for layered child pools during user code compilation.
func IsErrorEOF ¶ added in v1.9.0
IsErrorEOF reports whether err represents end-of-input: a plain io.EOF, or a ReaderError whose (possibly nested) cause is io.EOF. Use this instead of errors.Is(err, io.EOF) for reader output — ReaderError wraps io.EOF in a `cause` field and does not implement Unwrap, so errors.Is never matches it.
func PrecompiledNSChunk ¶ added in v1.3.0
PrecompiledNSChunk returns the precompiled main chunk for a namespace, or nil.
func ReadString ¶
ReadString parses a string into a let-go Value.
func SetMatchCljConditional ¶ added in v1.7.3
func SetMatchCljConditional(v bool)
SetMatchCljConditional toggles whether reader conditionals match :clj.
Types ¶
type CompileError ¶
type CompileError struct {
// contains filtered or unexported fields
}
func NewCompileError ¶
func NewCompileError(message string) *CompileError
func NewCompileErrorWithSource ¶
func NewCompileErrorWithSource(message string, info *vm.SourceInfo) *CompileError
func (*CompileError) Error ¶
func (r *CompileError) Error() string
func (*CompileError) GetCause ¶
func (r *CompileError) GetCause() error
func (*CompileError) InnermostMessage ¶
func (r *CompileError) InnermostMessage() string
InnermostMessage walks the error chain and returns the deepest error message.
func (*CompileError) InnermostSource ¶
func (r *CompileError) InnermostSource() *vm.SourceInfo
InnermostSource walks the error chain and returns the deepest source info found.
func (*CompileError) Source ¶
func (r *CompileError) Source() *vm.SourceInfo
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) CompileMultiple ¶
func (*Context) SetCurrentNS ¶
type LispReader ¶
type LispReader struct {
Tokens []Token
// contains filtered or unexported fields
}
func NewLispReader ¶
func NewLispReader(r io.Reader, inputName string) *LispReader
func NewLispReaderTokenizing ¶
func NewLispReaderTokenizing(r io.Reader, inputName string) *LispReader
type ReaderError ¶
type ReaderError struct {
// contains filtered or unexported fields
}
func NewReaderError ¶
func NewReaderError(r *LispReader, message string) *ReaderError
func (*ReaderError) Error ¶
func (r *ReaderError) Error() string
func (*ReaderError) GetCause ¶
func (r *ReaderError) GetCause() error
func (*ReaderError) IsEOF ¶
func (r *ReaderError) IsEOF() bool