Changeset 29509 in project


Ignore:
Timestamp:
08/04/13 18:37:55 (6 years ago)
Author:
juergen
Message:

some better names in list-bindings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/list-bindings

    r29499 r29509  
    5353==== define-ir-macro
    5454
    55 <syntax>(define-ir-macro (name . args) (injecting identifiers (comparing ()|(suffix . suffixed-ientifiers) xpr . xprs)))</syntax>
     55<syntax>(define-ir-macro (name . args) (injecting identifiers (comparing ()|(suffix . suffixed-keywords) xpr . xprs)))</syntax>
    5656         
     57where injecting and comparing are keywords.
    5758Simplifies implicit-renaming macros by destructuring
    5859the macro-form (name . args), injecting the identifiers
    59 and providing predicates to check if a symbol compares to
    60 the predicate's name with its suffix stripped
     60and providing predicates, suffixed-keywords, to check if a symbol
     61compares to the predicate's name with its suffix stripped.
     62Note, that this syntax shows nicely in the header, if there are injected
     63identifiers, i.e. if the macro is hygienic or not, and what the
     64additional keywords are, namely the suffixed-keywords with suffix
     65stripped.
    6166
    6267==== define-er-macro
    6368
    64 <syntax>(define-er-macro (name . args) (renaming (prefix . prefixed-identifiers) (comparing ()|(suffix . suffixed-ientifiers) xpr . xprs)))</syntax>
     69<syntax>(define-er-macro (name . args) (renaming (prefix . prefixed-identifiers) (comparing ()|(suffix . suffixed-keywords) xpr . xprs)))</syntax>
    6570         
     71where renaming and comparing are keywords.
    6672Simplifies explicit-renaming macros by destructuring
    6773the macro-form (name . args), binding prefixed-identifiers
    6874to its own name but with prefix stripped and providing
    69 predicates to check if a symbol compares to the predicate's
    70 name with the suffix stripped
     75predicates, suffixed-keywords, to check if a symbol compares to the
     76predicate's name with the suffix stripped.
     77Note, that contrary to the identifiers list in define-ir-macro, the list
     78prefixed-identifiers exposes information of the macro's implementation;
     79this list is usually updated in the process of macro-writing.
     80The list suffixed-keywords, on the other hand, provides information on the
     81additional keywords of the macro, if any: Simply strip the suffix.
    7182
    7283=== Requirements
Note: See TracChangeset for help on using the changeset viewer.