ethereum/serpent — pull request #31 by o-jasper (2014-05-26 00:21:52+00:00)
Title: More flexible addition of stuff with bodies, like `if:`, `init:`, added `case` as example.

`parse_lines` actually got simpler from it i reckon.

Could in principle easily define a `def simple macro pattern: replace_with`, that simply mashes the input up a bit and appends it to `rewriter.simple_macros`. However, i suggest clearly indicating macros. For instance `@macro_name(...input..)`. ([Julia](http://julialang.org/) uses the `@`, but not with superset of function-syntax.

Note that the other pull request #21 writing serpent isn't up to date with this. With the regular stuff it needs to use the `rewriter.preparing_simple_macros`. It mangles `if`s into `cond` right now and would have to either do the same to `case` or handle those things differently.