X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fglsl%2Foutput.cpp;h=7d502739903a6cd8708cfc758aac470cad2fa17f;hb=19a24f859cd7fcf581442319499ae24b3e7385a4;hp=81f335735e80eb433fd746ae85216dc59b309e83;hpb=d5c7c7f0b15c407b3da2184936e6deed18554c6a;p=libs%2Fgl.git diff --git a/source/glsl/output.cpp b/source/glsl/output.cpp index 81f33573..7d502739 100644 --- a/source/glsl/output.cpp +++ b/source/glsl/output.cpp @@ -112,25 +112,26 @@ void Formatter::visit(MemberAccess &memacc) void Formatter::visit(UnaryExpression &unary) { - if(unary.prefix) - append(unary.oper); + if(unary.oper->type==Operator::PREFIX) + append(unary.oper->token); unary.expression->visit(*this); - if(!unary.prefix) - append(unary.oper); + if(unary.oper->type==Operator::POSTFIX) + append(unary.oper->token); } void Formatter::visit(BinaryExpression &binary) { binary.left->visit(*this); - append(binary.oper); + append(binary.oper->token); binary.right->visit(*this); - append(binary.after); + if(binary.oper->token[0]=='[') + append(']'); } void Formatter::visit(Assignment &assign) { assign.left->visit(*this); - append(format(" %s ", assign.oper)); + append(format(" %s ", assign.oper->token)); assign.right->visit(*this); }