List Info

Thread: Ident && Match Brackets




Ident && Match Brackets
country flaguser name
Germany
2007-08-10 02:56:45
Hello guys,
 
in the following example I found three problems:
 
    - After the PHPDoc Tag the ident move all followed line one space to the right site.
    - In a nested switch/case, after the 2. switch block, the ident move all followed lines too much to the right site.
    - The PDT function Matchbracket found the '}' in the comment line. So the end bracket of the function will not be found.
 
 
Axel
 
==========================================
 
<?php
/**
 * InfoText
 *
&nbsp;*/
 
 function fctPrintHello(){
 
 &nbsp; &nbsp; switch($a){
 &nbsp;   ; &nbsp;  case 'A':
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; switch($b){
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; case 'B':
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  print $b;
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   break;
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; }
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; default:
 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;  print $a;
   ;  }
 
 &nbsp; &nbsp; print "Hello";
 &nbsp; &nbsp; // if(true)
&nbsp;   ; //
 ; &nbsp;  // }
&nbsp;
 }

?>
==========================================
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )