Skip to content

Commit

Permalink
Added async short closure support
Browse files Browse the repository at this point in the history
  • Loading branch information
assertchris committed Feb 15, 2017
1 parent 70b2642 commit 33442dc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/macros.pre
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

macro ·recursion {
* (···parameters) => {···body}
} >> {
async function(···parameters) {···body}
}

macro ·recursion {
(···parameters) => {···body}
} >> {
Expand Down
14 changes: 14 additions & 0 deletions tests/specs/async.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--DESCRIPTION--

Test async macro

--GIVEN--

$async = * ($path) => {
return $path;
};

--EXPECT--

$async = async function($path) {return $path;
};

0 comments on commit 33442dc

Please sign in to comment.