schemeutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package schemeutil provides conversion utilities between syntax, datum, and Go types.

Syntax/Datum Conversion

Boolean Conversion

For implementing Scheme predicates and control flow:

Collection

  • [AsList]: convert Go slice to proper Scheme list

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToBoolean

func BoolToBoolean(b bool) *values.Boolean

BoolToBoolean converts a Go bool to a Scheme boolean value.

func BooleanToBool

func BooleanToBool(b *values.Boolean) bool

BooleanToBool converts a Scheme *Boolean to a Go bool value.

func DatumToSyntaxValue

func DatumToSyntaxValue(sctx *syntax.SourceContext, o values.Value) syntax.SyntaxValue

DatumToSyntaxValue wraps a raw Scheme datum in syntax objects, attaching the provided SourceContext for source location and scope tracking. Recursively wraps pairs, vectors, and boxed values. If the input is already a SyntaxValue, it is returned unchanged.

func IsSyntaxComment

func IsSyntaxComment(v values.Value) bool

IsSyntaxComment returns true if the given value is a SyntaxComment.

func SyntaxValueToDatum

func SyntaxValueToDatum(sv values.Value) values.Value

SyntaxValueToDatum converts a syntax object back to a raw Scheme datum, stripping away source location and scope information. Recursively unwraps pairs, vectors, and boxed values.

func ValueToBool

func ValueToBool(b values.Value) bool

ValueToBool converts a value into a Go bool using Scheme semantics.

func ValueToBoolean

func ValueToBoolean(b values.Value) *values.Boolean

ValueToBoolean converts a value into a Scheme *Boolean using Scheme semantics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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