Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Sep 18, 2010 4:10 pm   

[3.27] [Fixed in 3.28] Reformat doesn't reposition '//' comments properly.
 
When reformat re-indents my lines it is no longer properly indenting '//' comments. The comments look like they stay at the indent position regardless of how it re-indents the text around it.

Reformat this text to observe:
Code:

#if (1) {
// hello
#say hello
}


Last edited by ReedN on Tue Sep 21, 2010 5:56 am; edited 2 times in total
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Sep 18, 2010 5:37 pm   
 
That is correct. The // at the beginning of the line is actually treated as a ; comment by the parser, and 3.27 fixed the bug that was indenting comments. So comments will now get left alone by the reformat.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Sep 18, 2010 5:43 pm   
 
The '//' comments looked better how it was previously. Now the comments don't match up with the text that it goes with. It makes it ugly and a lot harder to scan visually.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Sep 18, 2010 5:48 pm   
 
I'll see what I can do. If it's an easy parser fix then I'll do it, but I don't want to cause some side effect in the parser that screws up comments. As I said, it's an issue in that the parser returns the same tokens for // at the beginning of a line and ; and the ; comment cannot be indented by the reformat without messing up the script. So it's not the reformatter that I'd have to change, it's the parser itself. I'm nervous about changing anything in the parser this close to a release.

But if it's easy, I'll try it.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Tue Sep 21, 2010 5:54 am   
 
Confirmed fixed in 3.28.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net