
settings = {
  # [[modifier ]type ]arg[square brackets, white spaces, ...](,|EOL) with support
  # of prototype as argument types (not recursive).
  # 
  # Detailed expression:
  #function_args=(?:
  #                  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";
  }
}

