quote

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: EUPL-1.2 Imports: 5 Imported by: 1

Documentation

Overview

Package quote contains functions to use quotations These are: quote, quasiquote, unquote, unquote-splicing.

Quasiquote implementation is a little bit too simple as it does not support nested quasiquotes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallQuasiQuoteReader

func InstallQuasiQuoteReader(rd *reader.Reader, symQQ *sxpf.Symbol, chQQ rune, symUQ *sxpf.Symbol, chUQ rune, symUQS *sxpf.Symbol, chUQS rune)

InstallQuasiQuoteReader sets the reader macros to support quasi quotation.

func InstallQuasiQuoteSyntax

func InstallQuasiQuoteSyntax(env sxpf.Environment, symQQ, symUQ, symUQS *sxpf.Symbol) error

func InstallQuoteReader

func InstallQuoteReader(rd *reader.Reader, quoteSym *sxpf.Symbol, initCh rune)

InstallQuoteReader will install a quote symbol as a reader macro.

func InstallQuoteSyntax

func InstallQuoteSyntax(env sxpf.Environment, symQuote *sxpf.Symbol) error

InstallQuoteSyntax will setup the system to allow quoting values.

Types

type QuoteExpr

type QuoteExpr struct {
	Obj sxpf.Object
}

QuoteExpr executes to the given object.

It is similar to `eval.SelfExpr` but is used here to document the quasi-quote operation. Of course, it will probably help with debugging ;).

func (QuoteExpr) Compute

func (qe QuoteExpr) Compute(*eval.Engine, sxpf.Environment) (sxpf.Object, error)

Jump to

Keyboard shortcuts

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