Package kawa.lang
Class Syntax
java.lang.Object
kawa.lang.Syntax
- All Implemented Interfaces:
gnu.kawa.format.Printable,Named
- Direct Known Subclasses:
AutoloadSyntax,begin,BracketApply,constant_fold,define,define_alias,define_autoload,define_class,define_library,define_syntax,define_unit,DefineNamespace,export,fluid_let,IfFeature,ImportFromLibrary,Include,Lambda,let,let_syntax,location,Macro,MakeXmlElement,MatchDef,module_compile_options,module_extends,module_implements,module_name,module_static,object,prim_method,Quote,require,ResolveNamespace,Scan,set_b,syntax_case,syntax_error,syntax_rules,thisRef,with_compile_options
Abstract class for "syntax" objects.
Builtins and macros are instances of this class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetName()voidrewrite(Object obj, Translator tr) Re-write an expression that is an "application" of this Syntax object.rewriteForm(Pair form, Translator tr) booleanscanForDefinitions(Pair st, ScopeExp defs, Translator tr) Check if a statement is a definition, for initial pass.voidscanForm(Pair st, ScopeExp defs, Translator tr) voidvoid
-
Constructor Details
-
Syntax
public Syntax() -
Syntax
-
-
Method Details
-
getName
-
getSymbol
-
setName
-
setName
-
rewrite
Re-write an expression that is an "application" of this Syntax object.- Parameters:
obj- the arguments to this "application" (i.e. the cdr of the macro/builtin invocation)tr- the Translator that provides context- Returns:
- the re-written expression
-
rewriteForm
-
scanForm
-
scanForDefinitions
Check if a statement is a definition, for initial pass. Semi-deprecated - should convert calls to use scanForm.- Parameters:
st- the statement to checkdefs- where to add Declarations for found definitionstr- the compilation state- Returns:
- true on success
-
print
- Specified by:
printin interfacegnu.kawa.format.Printable
-