From c74b98e131774be3edb3f285d79e7e6075ea155d Mon Sep 17 00:00:00 2001 From: Stan Angeloff Date: Mon, 16 Apr 2012 16:52:50 +0300 Subject: [PATCH] Update template script to be smarter about missing extensions. --- update_syntax.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/update_syntax.php b/update_syntax.php index f1a3d58..6f2708d 100644 --- a/update_syntax.php +++ b/update_syntax.php @@ -103,11 +103,10 @@ $allowed_extensions = array( $processed = array(); foreach ($allowed_extensions as $extension) { - $details = array(); try { + $details = array(); $options = new ReflectionExtension($extension); - $details['name'] = $options->getName(); $classes = array(); $functions = array_keys($options->getFunctions()); @@ -120,6 +119,8 @@ foreach ($allowed_extensions as $extension) { $constants = array_unique($constants); + $details['name'] = $options->getName(); + if (sizeof ($functions)) { $details['functions'] = implode(' ', $functions); } @@ -129,11 +130,11 @@ foreach ($allowed_extensions as $extension) { if (sizeof ($classes)) { $details['classes'] = implode(' ', $classes); } + + $processed[$extension] = $details; } catch (Exception $e) { print "ERROR: '{$extension}' -- " . $e->getMessage() . "\n"; } - - $processed[$extension] = $details; } $code = "syn case match\n\n";