Block close check

BCS BCS at pathlink.com
Mon Dec 11 10:01:01 PST 2006


What might be the most useful would be for the compiler to check for a 
comment at the end of a block and if it clams to close a block that it 
doesn't, emit a warning.


//////these pass


for(int i=0;i<10;i++){
	...
}//CLOSE for i

while(j<k){
	...
}/*CLOSE while j < k this block has more comments */

outer: switch(n){
	...
}/+CLOSE outer: +/


//////these fail


inner: switch(n){
	...
}//CLOSE outer:

for(int i=0;i<10;i++){
	...
}//CLOSE for j



More information about the Digitalmars-d mailing list