public class SyntaxForms
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUGGING |
Constructor and Description |
---|
SyntaxForms() |
Modifier and Type | Method and Description |
---|---|
static boolean |
freeIdentifierEquals(SyntaxForm id1,
SyntaxForm id2) |
static java.lang.Object |
fromDatum(java.lang.Object datum,
SyntaxForm template)
Make a SyntaxForm object with the same contextual information as this.
|
static java.lang.Object |
fromDatumIfNeeded(java.lang.Object datum,
SyntaxForm template) |
static boolean |
isIdentifier(SyntaxForm form) |
static java.lang.Object |
makeForm(java.lang.Object datum,
TemplateScope scope) |
static java.lang.Object |
makeWithTemplate(java.lang.Object template,
java.lang.Object form)
Create a syntax object with specified datum, and given syntatic context.
|
static Expression |
rewrite(java.lang.Object x) |
static Expression |
rewriteBody(java.lang.Object x) |
static java.lang.String |
toString(SyntaxForm sform,
java.lang.String id) |
public static final boolean DEBUGGING
public static java.lang.Object makeForm(java.lang.Object datum, TemplateScope scope)
public static java.lang.Object makeWithTemplate(java.lang.Object template, java.lang.Object form)
template
- If this is a SyntaxForm, use its scope;
otherwise use the current Compilation's current scope.
(This means just returning the datum as-is.)form
- The value (S-expression datum) to use.public static boolean freeIdentifierEquals(SyntaxForm id1, SyntaxForm id2)
public static boolean isIdentifier(SyntaxForm form)
public static java.lang.Object fromDatum(java.lang.Object datum, SyntaxForm template)
datum
- which used for the new syntax value.
Corresponds to the datum->syntax-object
function.public static java.lang.Object fromDatumIfNeeded(java.lang.Object datum, SyntaxForm template)
public static Expression rewrite(java.lang.Object x)
public static Expression rewriteBody(java.lang.Object x)
public static java.lang.String toString(SyntaxForm sform, java.lang.String id)