Skip to content

Commit

Permalink
Merge pull request #2 from preprocess/feature/new-sigil
Browse files Browse the repository at this point in the history
New sigil
  • Loading branch information
assertchris authored Sep 10, 2018
2 parents 4327bea + e204856 commit 6defa14
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"name": "pre/optional-catch-type",
"license": "MIT",
"require": {
"pre/plugin": "^0.10.0"
"pre/plugin": "^0.11.0"
},
"require-dev": {
"phpunit/phpunit": "^5.0|^6.0"
},
"extra": {
"macros": ["source/macros.yay"]
"macros": [
"source/macros.yay"
]
}
}
14 changes: 7 additions & 7 deletions source/macros.yay
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

macro ·recursion {
$(macro :recursion) {
try {
···try
} catch (T_VARIABLE·name) {
···catch
$(layer() as try)
} catch ($(token(T_VARIABLE) as name)) {
$(layer() as catch)
}
} >> {
try {
···try
} catch (\Exception T_VARIABLE·name) {
···catch
$(try)
} catch (\Exception $(name)) {
$(catch)
}
}

0 comments on commit 6defa14

Please sign in to comment.