27Oct00
Procedural Macros for Java
Bachrach and Playford
syntaxSwitch Evaluation
•syntaxSwitch (?:expression) { rules:* }
•Expression must evaluate to a valid Fragment
•Expression is tested against each rule’s pattern in turn
•If one of the patterns matches, its pattern variables are bound to local variables of the same name and the corresponding right hand side body is run in the context of those bindings
•If no patterns are found to match, then an exception is thrown