Skip to content

Commit

Permalink
modified readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed May 8, 2013
1 parent 4ad0444 commit 5a3db09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion readme.md
Expand Up @@ -93,7 +93,7 @@ MacroPy intercepts the module-loading workflow, via the functionality provided b


Examples Examples
======== ========
Below are a few example uses of macros that are implemented (together with test cases!) in the [macropy/macros](macropy/macros) and [macropy/macros2](macropy/macros2) folders. These are also the ideal places to go look at to learn to write your own macros: check out the source code of the [String Interpolation](macropy/macros/string_interp.py) or [Quick Lambda](macropy/macros/quicklambda.py) macros for some small (<30 lines), self contained examples. Below are a few example uses of macros that are implemented (together with test cases!) in the [macropy/macros](macropy/macros) and [macropy/macros2](macropy/macros2) folders. These are also the ideal places to go look at to learn to write your own macros: check out the source code of the [String Interpolation](macropy/macros/string_interp.py) or [Quick Lambda](macropy/macros/quicklambda.py) macros for some small (<30 lines), self contained examples. Their [unit](macropy/macros/string_interp_test.py) [tests](macropy/macros/quicklambda_test.py) demonstrate how these macros are used.


Quasiquotes Quasiquotes
----------- -----------
Expand Down Expand Up @@ -158,6 +158,7 @@ print ast.dump(y)


This is convenient in order to interpolate a string variable as an identifier, rather than interpolating it as a string literal. This is convenient in order to interpolate a string variable as an identifier, rather than interpolating it as a string literal.


Overall, quasiquotes are an incredibly useful tool for assembling or manipulating the ASTs, and are used in the implementation in all of the following examples. See the [String Interpolation](macropy/macros/string_interp.py) or [Quick Lambda](macropy/macros/quicklambda.py) macros for short, practical examples of their usage.


String Interpolation String Interpolation
-------------------- --------------------
Expand Down

0 comments on commit 5a3db09

Please sign in to comment.