Module: dfmc-macro-expander Synopsis: The template "back-end" functions, calls to which are generated in order to construct a new fragment when evaluating a template. Author: Keith Playford Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND //// Expansion context. define thread variable *expansion-module* = #f; define macro with-expansion-module { with-expansion-module (?mod:expression) ?:body end } => { do-with-expansion-module(?mod, method () ?body end) } end macro; define inline function do-with-expansion-module (mod, body-thunk) dynamic-bind (*expansion-module* = mod) body-thunk(); end; end function; //// Template objects. define constant $the-empty-template = make(