Documentation at sweetjs.org. Example macros on the wiki

Overview and motivation in this talk.

Early stage at the moment. Lots of bugs so be warned!

Wish the function keyword in JavaScript wasn’t so long? What if you could define functions with def instead?

def sweet(a) {
  console.log("Macros are sweet!");
}

Macros let you do this!

macro def {
  case $name:ident $params $body => {
    function $name $params $body
  }
}