GNOME Bugzilla – Bug 540292
Doxygen refeers "defines" as "enum" in PHP code
Last modified: 2012-03-14 16:11:33 UTC
Hi, I've got the same problem than Romain Tartière's bug #358976. Description of the bug : Doxygen refeers "defines" as "enum" in PHP code Steps to reproduce: 1. Create a new config file using the wizard. 2. Select to include all entities and cross-ref'd source code 3. Output HTML only 4. Leave all other settings at their defaults. 5. Have the following script documented: <?php define( 'CONST1', 'Constant 1' ); define( 'CONST2', 'Constant 2' ); ?> Result in documentation : - Enumerations . enum CONST1 . enum CONST2 Thanks Fred +++ This bug was initially created as a clone of Bug #358976 +++ Considering this PHP input file : -- BEGIN INPUT FILE -- <?php define('foo', 'bar'); ?> --- END INPUT FILE --- Generating the documentation of this produces the following result: -- BEGIN SNIPPET -- Enumeration Type Documentation enum foo --- END SNIPPET --- Looks strange: foo is a constant, not an enumeration... $ doxygen --version 1.4.7 Debian GNU/Linux SID
This is a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=358976 I can confirm that this still happens in 1.7.2
*** This bug has been marked as a duplicate of bug 358976 ***
Created attachment 209748 [details] Test source
doxygen version 1.8.0 Windows XP Doxygen refeers "defines" as "enum" in PHP code Source: <?php define ('CONSTNAME1', 0); define ('CONSTNAME2', 'VALUE'); ?> Output: Enumerations enum CONSTNAME1 enum CONSTNAME2 Options: EXTRACT_ALL = true Output - HTML only other options: by default Temporarily I applying filter to replace: "define('CONSTNAME', VALUE)" => "const CONSTNAME = VALUE;" (C-style)