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:20 pm   

[3.27] [Fixed in 3.28] Reformatting isn't being done properly
 
The second #if should not be indented like it is, but it is being left indented erroneously.

Reformat this:
Code:
#if (1) {
// hello
#say hello
}
  #if (1) {
// hello
#say hello
}


Last edited by ReedN on Tue Sep 21, 2010 5:55 am; edited 1 time in total
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Sep 18, 2010 5:38 pm   
 
Is this a change from previous versions? I'll add this to the bug list, but I don't consider this a major issue. Especially since reformat issues should have been reported months and months ago.
Reply with quote
ReedN
Wizard


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

PostPosted: Sat Sep 18, 2010 5:41 pm   
 
It was working properly, but it changed with 3.27.
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Sep 18, 2010 5:46 pm   
 
Actually, testing this now in v3.16 shows the same issue. The only thing that changed is 3.27 is the // comments no longer get indented. But the second #IF statement remains indented.

Edited: Even trying v2.37 the second #IF remains indented. So this has been a problem for a long time.
Reply with quote
ReedN
Wizard


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

PostPosted: Sat Sep 18, 2010 5:50 pm   
 
Hmm, perhaps I just noticed it now since the // comments just changed. I've been frustrated today editing my scripts because all my comments now need to be adjusted manually, so I was probably mistaken on the issue listed in this post due to the other reformatting change.

I recall you saying that the reformatting code is very complex. Perhaps if the reformatting simply adjusted the indentation it could be made more manageable. For my part the thing I most desire from it is the auto-indentation. This is also very similar to the other editors I'm familiar with which have similar auto-indentation features.
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Sep 20, 2010 4:31 pm   
 
You cannot perform reformatting without a full language parser. Just doing auto-indentation is not easy. The editors that do it are doing it for languages that have a well defined language that can be easily parsed. zScript is not as easy to parse.
Reply with quote
ReedN
Wizard


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

PostPosted: Tue Sep 21, 2010 5:55 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