Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Fixed enum/struct documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Pes committed Jun 21, 2018
1 parent 5ffc6d7 commit cc47e0f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions gendoxy.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Copyright (C) 2018 Michele Pes

;; Author: Michele Pes <[email protected]>
;; Created: 23 June 2018
;; Created: 21 June 2018
;; Keywords: gendoxy, docs, doxygen
;; Version: 1.0.2
;; Homepage: https://github.com/mp81ss/gendoxy
Expand Down Expand Up @@ -70,6 +70,9 @@

;;; Change log:
;;
;; 1.0.3
;; Fixed enum/struct documentation
;;
;; 1.0.2
;; Critical bugfix on invalid C code invocation (due to regex backtracking)
;; Improved other regex
Expand Down Expand Up @@ -336,7 +339,7 @@
gendoxy-nl " * " gendoxy-default-text gendoxy-nl " */"
gendoxy-nl))
(when is-full
(gendoxy-document-items (point) (search-forward ";" nil t)))
(gendoxy-document-items (point) (search-forward "}" nil t)))
(message "gendoxy: typedef %s %s documented" name type-name)))

(defun gendoxy-handle-typedef-generic ()
Expand Down Expand Up @@ -378,7 +381,10 @@

(defun gendoxy-handle-typedef (is-full)
"Handle typedef constructs"
(let ( (org (point)) (terminator (search-forward ";" nil t)) )
(let ( (org (point))
(terminator (re-search-forward (concat "}" gendoxy-space-regex "*;")
nil
t)) )
(goto-char org)
(if (re-search-forward (gendoxy-get-typedef-regex "enum") terminator t)
(progn
Expand Down

0 comments on commit cc47e0f

Please sign in to comment.