salmanahmad / silo

The Silo Programming Language
0 stars 0 forks source link

Support SyntaxRule Macro #83

Closed salmanahmad closed 10 years ago

salmanahmad commented 10 years ago

Create a simple pattern-based syntax-rule macro similar to Racket. The best use case for this would be a for loop:

sytnax(for(start, condition, update, body) {
    $start
    while($condition {
        $body
        $update
    })
})
salmanahmad commented 10 years ago
tranform(for(init, condition, end, body) {
    init
    i = escape("init")
    while(condition {
        body
        end
    })
})
salmanahmad commented 10 years ago

Added in 43f33eda869b7dc731afe8c08448124c3db914b1. It is called transform.