kawa.standard

Class define_alias

Implemented Interfaces:
Named, Printable

public class define_alias
extends Syntax
implements Printable

Field Summary

static define_alias
define_alias

Method Summary

Expression
rewrite(Object obj, Translator tr)
Re-write an expression that is an "application" of this Syntax object.
boolean
scanForDefinitions(Pair st, java.util.Vector forms, ScopeExp defs, Translator tr)
Check if a statement is a definition, for initial pass.

Methods inherited from class kawa.lang.Syntax

getName, getSymbol, print, rewrite, rewriteForm, rewriteForm, scanForDefinitions, scanForm, setName, setName

Field Details

define_alias

public static final define_alias define_alias

Method Details

rewrite

public Expression rewrite(Object obj,
                          Translator tr)
Re-write an expression that is an "application" of this Syntax object.
Overrides:
rewrite in interface Syntax
Parameters:
obj - the arguments to this "application" (i.e. the cdr of the macro/builtin invokation)
tr - the Translator that provides context
Returns:
the re-written expression

scanForDefinitions

public boolean scanForDefinitions(Pair st,
                                  java.util.Vector forms,
                                  ScopeExp defs,
                                  Translator tr)
Check if a statement is a definition, for initial pass. Semi-deprecated - should convert calls to use scanForm.
Overrides:
scanForDefinitions in interface Syntax
Parameters:
st - the statement to check
forms - where to append the (possibly-modified) statement
defs - where to add Declarations for found definitions
tr - the compilation state
Returns:
true on success