Created
June 12, 2014 04:10
-
-
Save disnet/44f8572b863ed398a69a to your computer and use it in GitHub Desktop.
adjust lineNumber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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