From a44de4f76c4e4fa2d659b2256b3ee9a383d76f67 Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 24 Aug 2012 16:58:31 -0700 Subject: [PATCH] Link interfaces as classes Summary: We link classes from `extends` and `instanceof` (which can be both interface and class) and from `implements` (which is always interface). We don't need to split these two because they share the same namespace. If we decide to then we will need to: - Fix [[ https://secure.phabricator.com/diffusion/P/browse/master/src/applications/diffusion/controller/DiffusionSymbolController.php;66a300768a62bbc9$79 | DiffusionSymbolController ]] - Fix [[ https://secure.phabricator.com/diffusion/P/browse/master/webroot/rsrc/js/application/repository/repository-crossreference.js;66a300768a62bbc9$24 | repository-crossreference ]] - Allow more types in `DiffusionSymbolController`. Test Plan: Ran the script on secure.phabricator.com, clicked on `ArcanistLintRenderer` symbol. Reviewers: epriestley, alanh Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3382 --- scripts/symbols/generate_php_symbols.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/symbols/generate_php_symbols.php b/scripts/symbols/generate_php_symbols.php index 7be7a7c553..e4273ed9b4 100755 --- a/scripts/symbols/generate_php_symbols.php +++ b/scripts/symbols/generate_php_symbols.php @@ -63,7 +63,8 @@ foreach (Futures($futures)->limit(8) as $file => $future) { $interfaces = $root->selectDescendantsOfType('n_INTERFACE_DECLARATION'); foreach ($interfaces as $interface) { $interface_name = $interface->getChildByIndex(1); - print_symbol($file, 'interface', $interface_name); + // We don't differentiate classes and interfaces in highlighters. + print_symbol($file, 'class', $interface_name); $scopes[] = array($interface, $interface_name); }