Changeset 37488 in project for wiki/explicit-renaming-macros


Ignore:
Timestamp:
03/29/19 18:08:01 (11 months ago)
Author:
juergen
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/explicit-renaming-macros

    r34845 r37488  
    201201
    202202And here is the much easier solution with define-er-macro from the
    203 basic-macros egg.
     203procedural-macros egg.
    204204
    205205<enscript highlight="scheme">
     
    279279automatically with explicit- and implicit-renaming-macros as well?
    280280
    281 Yes, there is. You can use the bind macro from the basic-macros module.
     281Yes, there is. You can use the bind macro from the bindings module.
    282282It's a version of destructuring-bind of Common Lisp.
    283283Using it you can replace the let above
     
    290290
    291291<enscript highlight="scheme">
     292(import-for-syntax (only bindings bind))
    292293(bind (_ x y) form ...)
    293294</enscript>
     
    300301bind, but what about renaming/injecting and additional keywords?
    301302
    302 Well, the procedural-macros module, which is written on top of
    303 basic-macros, will help with solving these problems.  For example, we've
    304 provided a procedural variant of syntax-rules, named macro-rules, which
    305 cares for all three arguments of the macro-transformer, and -- based on
    306 it -- a hygienic version of define-macro.
     303Well, the procedural-macros module, will help with solving these
     304problems.  For example, we've provided a procedural variant of
     305syntax-rules, named macro-rules, which cares for all three arguments of
     306the macro-transformer, and -- based on it -- a hygienic version of
     307define-macro.
    307308
    308309<enscript highlight="scheme">
     
    319320
    320321<enscript highlight="scheme">
     322(import-for-syntax (only procedural-macros macro-rules))
    321323(define-syntax vif
    322324  (macro-rules (then else)
     
    333335For details see
    334336
    335 [[/eggref/4/basic-macros|basic-macros]]
    336 [[/eggref/4/procedural-macros|procedural-macros]]
     337[[/eggref/5/procedural-macros|procedural-macros]]
    337338
    338339Procedural macros are really great ...
     
    354355
    355356Nov 01, 2017
     357
     358== and again for chicken-5
     359
     360Mar 29, 2019
     361
Note: See TracChangeset for help on using the changeset viewer.