Skip to content

yetone/sweet.js

 
 

Repository files navigation

Build Status

Join the chat at https://gitter.im/mozilla/sweet.js

Hygienic Macros for JavaScript!

Macros allow you to build the language of your dreams. Sweeten JavaScript by defining new syntax for your code.

Sweet just got a shiny new 1.0 release. Some context about the changes is provided in this post

Getting started

Install sweet.js with npm:

$ npm install sweet.js

Write your sweet code:

syntax hi = function (ctx) {
  return #`console.log('hello, world!')`;
}
hi

And compile:

$ node_modules/.bin/sjs my_sweet_code.js
console.log('hello, world!')

Learning More

Packages

No packages published

Languages

  • JavaScript 98.8%
  • Other 1.2%