Skip to content

Commit

Permalink
Version 0.2.4
Browse files Browse the repository at this point in the history
Bug correction (thanks to Anders Bo Rasmussen)
   - C++: now functions like  void foo(type &bar); are correctly documented.
          The parameter's name is 'bar' (and no more '&bar').
  • Loading branch information
babaybus authored and vim-scripts committed Nov 6, 2010
1 parent f3347b1 commit 43ce2be
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions plugin/DoxygenToolkit.vim
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
" DoxygenToolkit.vim
" Brief: Usefull tools for Doxygen (comment, author, license).
" Version: 0.2.3
" Version: 0.2.4
" Date: 03/26/09
" Author: Mathias Lorente
"
" TODO: add automatically (option controlled) in/in out flags to function
" parameters
" TODO: (Python) Check default paramareters defined as list/dictionnary/tuple
"
" Note: Bug correction (thanks to Anders Bo Rasmussen)
" - C++: now functions like void foo(type &bar); are correctly documented.
" The parameter's name is bar (and no more &bar).
"
" Note: Added @version tag into the DocBlock generated by DoxygenAuthorFunc()
" (thanks to Dave Walter).
" The version string can be defines into your .vimrc file with
Expand Down Expand Up @@ -576,7 +580,7 @@ function! <SID>DoxygenCommentFunc()
endif

" Trim the buffer
let l:lineBuffer = substitute( l:lineBuffer, "^[[:blank:]]*\|[[:blank:]]$", "", "g" )
let l:lineBuffer = substitute( l:lineBuffer, "^[[:blank:]]*\|[[:blank:]]*$", "", "g" )

" Remove any template parameter.
if( s:CheckFileType() == "cpp" )
Expand Down Expand Up @@ -789,7 +793,7 @@ endfunction
" - Functions which return pointer to function are not supported.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! s:ParseFunctionParameters( lineBuffer, doc )
" call s:WarnMsg( 'IN__'.a:lineBuffer )
"call s:WarnMsg( 'IN__'.a:lineBuffer )
let l:paramPosition = matchend( a:lineBuffer, 'operator[[:blank:]]*([[:blank:]]*)' )
if ( l:paramPosition == -1 )
let l:paramPosition = stridx( a:lineBuffer, '(' )
Expand All @@ -799,7 +803,7 @@ function! s:ParseFunctionParameters( lineBuffer, doc )


" (cpp only) First deal with function name and returned value.
" Function name has alredy been retrieved for Python and we need to parse
" Function name has already been retrieved for Python and we need to parse
" all the function definition to know whether a value is returned or not.
if( s:CheckFileType() == "cpp" )
let l:functionBuffer = strpart( a:lineBuffer, 0, l:paramPosition )
Expand Down Expand Up @@ -886,7 +890,7 @@ function! s:ParseParameter( param )
let l:firstIndex = stridx( a:param, '(' )

if( l:firstIndex == -1 )
let l:paramName = split( a:param, '[[:blank:]*]' )[-1]
let l:paramName = split( a:param, '[[:blank:]*&]' )[-1]
else
if( l:firstIndex != 0 )
let l:startIndex = 0
Expand Down

0 comments on commit 43ce2be

Please sign in to comment.