X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fdebug.cpp;h=ddf1013dda2b5a70b00619c821652ae7d50f9e15;hb=bde40be11da83206f3d33a8225963d47a413662e;hp=68615ed6e06d67c7491a2e88ce10bce360b1685d;hpb=30f676460bb6e87fd7ca2532e507b97965c4a407;p=libs%2Fgl.git diff --git a/source/glsl/debug.cpp b/source/glsl/debug.cpp index 68615ed6..ddf1013d 100644 --- a/source/glsl/debug.cpp +++ b/source/glsl/debug.cpp @@ -196,7 +196,7 @@ void DumpTree::visit(UnaryExpression &unary) void DumpTree::visit(BinaryExpression &binary) { - append(format("Binary: %s -> %s", (binary.oper->token[0]=='[' ? "[]" : binary.oper->token), format_type(binary.type))); + append(format("Binary: %s%s -> %s", binary.oper->token, binary.oper->token2, format_type(binary.type))); begin_sub(); binary.left->visit(*this); last_branch(); @@ -240,6 +240,17 @@ void DumpTree::visit(Assignment &assign) end_sub(); } +void DumpTree::visit(TernaryExpression &ternary) +{ + append(format("Ternary: %s%s -> %s", ternary.oper->token, ternary.oper->token2, format_type(ternary.type))); + begin_sub(); + ternary.condition->visit(*this); + ternary.true_expr->visit(*this); + last_branch(); + ternary.false_expr->visit(*this); + end_sub(); +} + void DumpTree::visit(FunctionCall &call) { string head = "Function call: ";