Changeset 29479 for lang/elisp

Show
Ignore:
Timestamp:
02/03/09 17:27:45 (5 years ago)
Author:
imakado
Message:

fix TAGS parser

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/elisp/php-completion/branches/candidates-from-TAGS/php-completion.el

    r29455 r29479  
    323323 
    324324;; classes: 
    325 ;; (("classname" . ("method" "method1" "method2")) 
    326 ;;  ("classname1" . ("method" "method1" "method2"))) 
    327 ;; のような構造の association list 
     325;; list of Struct `phpcmp-tag' 
    328326 
    329327;; functions: 関数のリスト 
     
    422420         ((looking-at (rx bol (* space) "class")) 
    423421          (push (phpcmp-deftag-parse-class) classes)) 
    424          ((looking-at phpcmp-etags-parse-tags-file-regexp) 
    425           (push (match-string 5) functions) 
     422         ((looking-at (rx bol (* space) (? (or "public" "private")) (* space) "function")) 
     423          (when (looking-at phpcmp-etags-parse-tags-file-regexp) 
     424            (let ((function (match-string 5))) 
     425              (push function functions))) 
     426          (forward-line)) 
     427         ((looking-at (rx bol (* space) "$" (+ (any alnum "_")) (* space) "=")) 
     428          (when (looking-at phpcmp-etags-parse-tags-file-regexp) 
     429            (let ((variable (match-string 5))) 
     430            (push variable variables))) 
    426431          (forward-line)) 
    427432         (t 
     
    431436       :path (concat (file-name-directory tag-file) 
    432437                     relative-file-path) 
     438       :relative-path relative-file-path 
    433439       :classes classes 
    434440       :functions functions