diff --git a/src/macros.pre b/src/macros.pre index f660b2c..79ca67e 100644 --- a/src/macros.pre +++ b/src/macros.pre @@ -1,5 +1,11 @@ <?php +macro ·recursion { + * (···parameters) => {···body} +} >> { + async function(···parameters) {···body} +} + macro ·recursion { (···parameters) => {···body} } >> { diff --git a/tests/specs/async.spec b/tests/specs/async.spec new file mode 100644 index 0000000..4c41fdc --- /dev/null +++ b/tests/specs/async.spec @@ -0,0 +1,14 @@ +--DESCRIPTION-- + +Test async macro + +--GIVEN-- + +$async = * ($path) => { + return $path; +}; + +--EXPECT-- + +$async = async function($path) {return $path; +};