Skip to content

Instantly share code, notes, and snippets.



Created Apr 10, 2017
What would you like to do?
import * as H from 'sweet.js/helpers' for syntax;
syntax m = ctx => {
let v =;
if (H.isIdentifier(v, 'foo') {
return H.fromString(v, 'bar');
return H.fromString(v, 'baz');
m foo; // expands to 'bar'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.