Kitsnet - Macros - Kernel
Last published: September 2, 2007 by 'jdougan'
Defines 2 Classes
Extends 9 Classes
This is the kernel of an implementation of a simple procedural syntax macro system for VisualWorks. It is designed to be minimally invasive and is patterned around the approach used in Slate. No actual macros are defined in this package.
Macro calls are intruduces with a leading backquote on the message selector. This signals the compiler to call the method in question with the parse trees for the arguments and receivers. The returnd parse tree frm ths call is, in effect, substitued for the macro expression in the source.
Typical macro call: foo := (Float pi * 2.0) `literal.
This will run (Float pi * 2) at compile time and substitute the result into the code as a literal value.
The project web page is at