Skip to content

Instantly share code, notes, and snippets.

@disnet
Created June 12, 2014 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save disnet/44f8572b863ed398a69a to your computer and use it in GitHub Desktop.
Save disnet/44f8572b863ed398a69a to your computer and use it in GitHub Desktop.
adjust lineNumber
macro m {
rule {} => {
(function() {
return
{
foo: "bar"
}
})
}
}
function foo() {
return m;
}
// expands to:
function foo() {
return (function() {
return
{
foo: "bar"
}
})
}
// but collapsing to one line is wrong
function foo() {
return (function() { return {foo: "bar"} })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment