diff --git a/src/ControlStructure/TryCatchToken.php b/src/ControlStructure/TryCatchToken.php new file mode 100644 index 0000000..501eec1 --- /dev/null +++ b/src/ControlStructure/TryCatchToken.php @@ -0,0 +1,25 @@ +"; + + case "catch": + return ""; + + case "finally": + return ""; + + case "endtry": + return ""; + } + } +} diff --git a/src/Language/DefaultRegistrations.php b/src/Language/DefaultRegistrations.php index d694e29..971ab68 100644 --- a/src/Language/DefaultRegistrations.php +++ b/src/Language/DefaultRegistrations.php @@ -32,6 +32,7 @@ class DefaultRegistrations implements LanguageRegistration public function registerControlStructure(Compiler $compiler) : void { + $compiler->registerControlStructure(new \Picea\ControlStructure\TryCatchToken()); $compiler->registerControlStructure(new \Picea\ControlStructure\NamespaceToken()); $compiler->registerControlStructure(new \Picea\ControlStructure\UseToken()); $compiler->registerControlStructure(new \Picea\ControlStructure\IfToken());