Sweeten your JavaScript.
See the codeHygienic Macros for JavaScript!
Macros allow you to build the language of your dreams. Sweeten JavaScript by defining new syntax for your code.
Currently, Sweet should be considered experimental and under heavy development (re-development more like). As such, the API will be undergoing a bit of churn until probably the end of the year. So, probably best not to try Sweet in production systems just yet. If you're interested in helping out though we'd love to have you!
Install the command line app with npm:
$ npm install -g @sweet-js/cli
Write your sweet code:
syntax hi = function (ctx) {
return #`console.log('hello, world!')`;
}
hi
And compile:
$ sjs my_sweet_code.js
console.log('hello, world!')
(top 24 of 95)
2,521 followers · starred Aug 2012
1,082 followers · starred Sep 2016
4,567 followers · starred Feb 2013
1,829 followers · starred Aug 2012
Sweeten your JavaScript.
See the codeHygienic Macros for JavaScript!
Macros allow you to build the language of your dreams. Sweeten JavaScript by defining new syntax for your code.
Currently, Sweet should be considered experimental and under heavy development (re-development more like). As such, the API will be undergoing a bit of churn until probably the end of the year. So, probably best not to try Sweet in production systems just yet. If you're interested in helping out though we'd love to have you!
Install the command line app with npm:
$ npm install -g @sweet-js/cli
Write your sweet code:
syntax hi = function (ctx) {
return #`console.log('hello, world!')`;
}
hi
And compile:
$ sjs my_sweet_code.js
console.log('hello, world!')
(top 24 of 95)
2,521 followers · starred Aug 2012
1,082 followers · starred Sep 2016
4,567 followers · starred Feb 2013
1,829 followers · starred Aug 2012