Documentation
¶
Overview ¶
Package schemeutil provides conversion utilities between syntax, datum, and Go types.
Syntax/Datum Conversion ¶
- SyntaxValueToDatum: strip source location and scope info from syntax
- DatumToSyntaxValue: wrap raw values with source context
- IsSyntaxComment: check for comment syntax types
Boolean Conversion ¶
For implementing Scheme predicates and control flow:
- [BoolToBoolean]: Go bool -> Scheme #t/#f
- [BooleanToBool]: Scheme #t/#f -> Go bool
- [ValueToBool]: Scheme truthiness (only #f is false)
- [ValueToBoolean]: coerce any value to Scheme boolean
Collection ¶
- [AsList]: convert Go slice to proper Scheme list
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatumToSyntaxValue ¶
func DatumToSyntaxValue(ctx context.Context, 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 ¶
IsSyntaxComment returns true if the given value is a SyntaxComment.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.