Mesa (master): glsl: Fix absurd whitespace conventions in the parser.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Jul 16 18:30:43 UTC 2013


Module: Mesa
Branch: master
Commit: 00d32cd5b4119b8c477326d72ae8d069ea87b49e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=00d32cd5b4119b8c477326d72ae8d069ea87b49e

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat Jul 13 14:44:45 2013 -0700

glsl: Fix absurd whitespace conventions in the parser.

Historically, we indented grammar production rules with a single 8-space
tab, but code inside of blocks used Mesa's 3-space indents.

This meant when editing code, you had to use an 8-space tab for the
first level of indentation, and 3-spaces after that.  Unless you
specifically configure your editor to understand this, it will get the
indentation wrong on every single line you touch, which quickly devolves
into a colossal waste of time.

It's also inconsistent with every other file in the entire project.

This patch removes all tabs and moves to a consistent 3-space indent.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

---

 src/glsl/glsl_parser.yy | 3387 +++++++++++++++++++++++------------------------
 1 files changed, 1691 insertions(+), 1696 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=00d32cd5b4119b8c477326d72ae8d069ea87b49e



More information about the mesa-commit mailing list