Skip to content

sweet-js/sweet-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ef72806 · Aug 31, 2017
Aug 31, 2017
Aug 31, 2017
Dec 27, 2016
Mar 13, 2017
Jul 17, 2017
Dec 27, 2016
May 4, 2017
Mar 13, 2017
Mar 2, 2016
Dec 27, 2016
Aug 19, 2016
Sep 23, 2012
Apr 23, 2017
Dec 27, 2016
Dec 29, 2016
Apr 10, 2017
Jan 6, 2017
Aug 17, 2017
Aug 17, 2017
Jun 11, 2016
Jan 14, 2017
May 13, 2017

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.

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!

Getting started

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!')

Learning More