bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-indent] C++ ability for indent .. code patch and question.


From: Carlo Wood
Subject: Re: [Bug-indent] C++ ability for indent .. code patch and question.
Date: Sat, 12 Jan 2002 16:58:00 +0100
User-agent: Mutt/1.2.5i

On Sat, Jan 12, 2002 at 09:29:27AM -0500, Preston A. Elder wrote:
> >>             if (token - cur_line)
> >>                 if (token[-1] == ' ' || token[-1] == TAB)
> >>                     parser_state_tos->want_blank = true;
> 
> So you're above examples work just fine (note, I used the 

Ah ok, now I see what you're trying to do.

Aren't there people using a format like:

if (a>b) {
 a=b;
}

though?

If they are, and they start with:

if (a > b) {
 a = b;
}

then the resulting code would be:

if (a >b) {
 a=b;
}

I think that the correct strategy is to never catenate two '>' tokens.
If might be better to add a flag to parser_state_tos that indicates
that the last token was a '<' and then request a space before the
current '<' token if there was also a space before it in the input.

-- 
Carlo Wood <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]