Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
hosiawak committed Oct 17, 2011
1 parent 7c50664 commit 7428ffc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ The macros utilize parser/compiler architecture and transform AST and generate c

The idea occured to me after playing with Rubinius bytecode compiler in an irb session: https://gist.github.com/1021515

## It's like Rewrite Rails (but better :) )
## It's similar to Rewrite Rails

Then thinking about the possibility of macros in Ruby I found Raganwald's Rewrite Rails https://github.com/raganwald/rewrite_rails and thus this project emerged.
but instead of using an external parser to parse .rr files and modify AST it uses Rubinius' compiler to achieve it.
The implementation is much simpler.

The main difference between Rewrite Rails and rubinius_macros is rubinius_macros runs on Rubinius and Rubinius has got a very flexible compiler infrastructure.
That's why the macros don't need an external parser/tool and any extra steps to reparse your Ruby program containing macros into something Ruby understands.
This is all done automatically during parsing/bytecode generation stages by Rubinius. Rewrite Rails utilized an external parser for .rr files.
In addition to AST some of the macros generate custom bytecode for some macros (Recur)

## Goals:

Expand Down

0 comments on commit 7428ffc

Please sign in to comment.