Releases: sweet-js/sweet-core
Releases · sweet-js/sweet-core
Infix macros
Infix macros!
macro => {
rule infix { ($params ...) | { $body ... } } => {
function ($params ...) { $body ... }
}
}
var f = (x, y) => { return x + y }
v0.3.2
v0.3.1
Sweet Gorgia Brown
- Source maps! Use
--sourcemap
to generate them. - ES6 support! Now you can use
let
,const
,yield
etc. in your compiled source. - Lots of bugs squashed.
Performance winning
Huge performance win in this version. More to do but a really painful slowdown in #90 has finally been resolved. Also:
Throw syntax errors with better line number information in macros #116:
macro $test {
case { _ { $tok ... } } => {
var tok = #{ $tok ... }
throwSyntaxError('test', 'Unexpected token', tok);
return [];
}
}
$test { foo }