(type egg)
(signature "begin-syntax egg")
(timestamp 1612269484)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/begin-syntax" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg")) (section 2 "begin-syntax" (toc)) (section 2 "Description" (p "This is a small extension that allows for inline macro operations.") (p "The source for this extension is available " (link "https://git.foldling.org/chicken-begin-syntax.git" "here") ".")) (section 2 "Usage" (def (sig (syntax "(begin-syntax EXPR ...)" (id begin-syntax))) (p "Evaluates its body and immediately inserts the final result into the program, as though by macro expansion.") (p "If the result is a macro transformer, then this is immediately invoked with no arguments and the result is inserted into the program. " (b "Note that in this case the final expression of the " (tt "begin-syntax") " body will be evaluated twice") ".") (p "This form can be thought of as a macro definition followed by its immediate expansion, for example:") (highlight scheme "(begin-syntax '(+ 1 2))\n\n; => (let-syntax ((a (er-macro-transformer\n;                     (lambda (_ _ _) '(+ 1 2)))))\n;      (a))"))) (section 2 "Author" (p (int-link "/users/evan-hanson" "Evan Hanson"))) (section 2 "License" (p "3-Clause BSD"))))
