On Wed, 29 Jun 2011 21:05:51 -0700, Carl Sorensen <c_soren...@byu.edu> wrote:
On 6/29/11 6:01 PM, "Keith OHara" <k-ohara5...@oco.net> wrote:
Graham Percival <graham <at> percival-music.ca> writes:
At the moment I'm leaning towards using astyle+postprocessing.
padding that can be helpful
- && ((d == LEFT && !line_->get_bound (LEFT))
- || (end && d == RIGHT && !line_->get_bound (RIGHT))))
+ && ( (d == LEFT && !line_->get_bound (LEFT))
+ || (end && d == RIGHT && !line_->get_bound (RIGHT))))
I am ambivalent about the padding above.
By the way, this is an example where post-processing can cause trouble. s/(
(/((/g subtly misaligns the indentation
+ && ((d == LEFT && !line_->get_bound (LEFT))
+ || (end && d == RIGHT && !line_->get_bound (RIGHT))))
but if we fiddle with padding first and let Astyle indent without the padding
options, then everything is copacetic.
or maybe annoying
- if (Stem::get_beam ((*stems_)[i]))
+ if (Stem::get_beam ( (*stems_) [i]))
I very much dislike the padding above here. Both the space before (*stems)
and the space before [i].
Do you have the ability to easily test a change that doesn't pad a
parenthesis if it's following the same character, ie. (( won't get an extra
space?
Maybe. Astyle is open-source and clearly written, but I haven't looked at this
area of the code.
It would be harder than testing a sed expression for pre-processing, but easier
than figuring out fixcc.py.
And is there an option to avoid padding [?
No. In the language of Astyle's options, the padding is associated with the )
before the [. There is an open feature request for an option that pads only
before the ( of a function call operator, which would fill our current need.
I assume the requested option would also pad the cast operator, (int) (n / d)
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel