SF.net SVN: geany-plugins:[1593] trunk/geany-plugins/geanygendoc/data/ filetypes/php.conf

colombanw at users.sourceforge.net colombanw at xxxxx
Sat Sep 18 01:01:34 UTC 2010


Revision: 1593
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1593&view=rev
Author:   colombanw
Date:     2010-09-18 01:01:34 +0000 (Sat, 18 Sep 2010)

Log Message:
-----------
GeanyGenDoc: Add configuration file for PHP

It needs a lot of testing and probably many improvements, but at least
provides some support for PHP.

Added Paths:
-----------
    trunk/geany-plugins/geanygendoc/data/filetypes/php.conf

Added: trunk/geany-plugins/geanygendoc/data/filetypes/php.conf
===================================================================
--- trunk/geany-plugins/geanygendoc/data/filetypes/php.conf	                        (rev 0)
+++ trunk/geany-plugins/geanygendoc/data/filetypes/php.conf	2010-09-18 01:01:34 UTC (rev 1593)
@@ -0,0 +1,70 @@
+
+settings = {
+  # [type ][&]$arg[default value, ...](,|EOL)
+  # 
+  # Detailed expression:
+  # 
+  # (?:
+  #     matches () not to try to extract an argument for it
+  #  ^\\([ \t]*\\)$
+  # |
+  #     optional type
+  #  (?:(?:[a-zA-Z0-9_]+[ \t]+)*
+  #     optional pass-by-ref
+  #  (?:&[ \t]*)?
+  #     the argument name itself (only capture)
+  #  (\\$[a-zA-Z0-9_.]+)
+  #     permissive match for post-arg (e.g. default value)
+  #  [^,]*
+  #     , or EOL
+  #  (?:,|$)
+  # )
+  # 
+  # note that \ are escaped, so to have a \ you need to put \\
+  match_function_arguments = "(?:^\\([ \t]*\\)$|(?:[a-zA-Z0-9_]+[ \t]+)*(?:&[ \t]*)?(\\$[a-zA-Z0-9_.]+)[^,]*(?:,|$))";
+  
+  # global env
+  global_environment = "doxygen_prefix  = \"@\";
+                        write_since     = 0;";
+}
+
+doctypes = {
+  doxygen = {
+    function.template = "/**\n * {doxygen_prefix}brief {cursor}\n{for a in argument_list} * {doxygen_prefix}param {a} \n{end}{if returns} * {doxygen_prefix}returns \n{end}{if write_since} * {doxygen_prefix}since \n{end} * \n * \n */\n";
+    macro.template    = "/**\n * {doxygen_prefix}brief {cursor}\n{for a in argument_list} * {doxygen_prefix}param {a} \n{end}{if returns} * {doxygen_prefix}returns \n{end}{if write_since} * {doxygen_prefix}since \n{end} * \n * \n */\n";
+    struct.member = {
+      template = " /**< {cursor} */";
+      position = AFTER;
+    }
+    struct = {
+      template          = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n";
+      auto_doc_children = True;
+    }
+    union.member = {
+      template = " /**< {cursor} */";
+      position = AFTER;
+    }
+    union = {
+      template          = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n";
+      auto_doc_children = True;
+    }
+    enum = {
+      template          = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n";
+      auto_doc_children = True;
+    }
+    enum.enumval = {
+      template = " /**< {cursor} */";
+      position = AFTER;
+    }
+    typedef.template  = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n";
+    define.template   = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n";
+    class.template = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n";
+    
+    # Completely ignore variables since they are reported even inside a
+    # function, which is more annoying than anything else.
+    # Unfortunately GGD don't know (yet?) the parent of a variable with PHP,
+    # so we can't restrict it to only function.variable
+    variable.policy = PASS;
+  }
+}
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list