Je dois faire un éditeur avec le navigateur de symbole et j'ai dit que je jouerais avec ctags. Eh bien, je lis le format ctags et essayé à Google et recherche ici à SO. Tout ce que j'ai trouvé étaient des questions sur ctags et vim et je suis nul à vim. J'ai donc décidé de jouer par moi-même. J'ai donc pris un fichier d'étiquettes et j'étais totalement confus!Analyse Ctags exuberant avec C++
Ici, j'ai mis le fichier PHP et son tag correspondant et j'ai besoin de votre aide sur comment savoir si la ligne représente l'attribut de classe ou la méthode? Aussi, comment puis-je connaître la valeur de retour de la fonction/méthode PHP?
Je n'ai pas trouvé de bon tutoriel sur le traitement des balises PHP (ou autre langue) dans les ctags autres que vi/vim connectés! Merci
fichier PHP
<?php
$teachers = array("standard one"=>"Celina Stephen", "Standard Two"=>"Emanyor Dickson");
function set_teachers($teacher_array){
$teachers = $teacher_array;
return $teacher_array;
}
class School{
$teachers;
$students;
public function __construct(){
}
public function get_all(){
return array($this->teachers,$this->students);
}
}
class ManySchools extends School{
public __construct(){
parent::construct();
}
private do_selection($teacher, $student=null){
return false;
}
}
balises déposent
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /[email protected]/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.9~svn20110310 //
ManySchools test.php /^class ManySchools extends School{$/;" c
School test.php /^class School{$/;" c
__construct test.php /^ public function __construct(){$/;" f
get_all test.php /^ public function get_all(){$/;" f
set_teachers test.php /^function set_teachers($teacher_array){$/;" f
teachers test.php /^ $teachers = $teacher_array;$/;" v
teachers test.php /^$teachers = array("standard one"=>"Celina Stephen", "Standard Two"=>"Emanyor Dickson");$/;" v
Est-il exact de dire que le format est: ** Nom fichier/^ signature; gentil** ? –
Presque, c'est nom de fichier/searchpattern /; "kind'. Comme je l'ai dit, jetez un oeil à la page de manuel, tout est expliqué ici (sous' TAG FILE FORMAT'). –