Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed spacing for binary operators in print_ast().
  • Loading branch information
icculus committed Nov 2, 2010
1 parent dbd12e2 commit a61306c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/mojoshader-compiler.c
Expand Up @@ -147,9 +147,10 @@ static void print_ast(FILE *io, const int substmt, const void *_ast)
case MOJOSHADER_AST_OP_ANDASSIGN:
case MOJOSHADER_AST_OP_XORASSIGN:
case MOJOSHADER_AST_OP_ORASSIGN:
fprintf(io, " "); // then fall through! (no space before the comma).
case MOJOSHADER_AST_OP_COMMA:
print_ast(io, 0, ast->binary.left);
if (ast->ast.type != MOJOSHADER_AST_OP_COMMA)
fprintf(io, " "); // no space before the comma.
fprintf(io, "%s ", binary[
(typeint - MOJOSHADER_AST_OP_START_RANGE_BINARY) - 1]);
print_ast(io, 0, ast->binary.right);
Expand Down

0 comments on commit a61306c

Please sign in to comment.