X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.cpp;h=11a099b5ad3175e94b82f8a75b2877ec5e07c5a9;hp=cad7c9f4838962740c2036a6c91ab25517032e24;hb=3a1fe833ea04df75449706f1d773f6e65521a392;hpb=1476e64621ecbd7b17b00ae2c958322fd39918de diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index cad7c9f4..11a099b5 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -40,8 +40,8 @@ const Operator Operator::operators[] = { "&&", 12, BINARY, ASSOCIATIVE }, { "^^", 13, BINARY, ASSOCIATIVE }, { "||", 14, BINARY, ASSOCIATIVE }, - { "?", 15, BINARY, RIGHT_TO_LEFT }, - { ":", 15, BINARY, RIGHT_TO_LEFT }, + { "?", 15, TERNARY, RIGHT_TO_LEFT }, + { ":", 15, TERNARY, RIGHT_TO_LEFT }, { "=", 16, BINARY, RIGHT_TO_LEFT }, { "+=", 16, BINARY, RIGHT_TO_LEFT }, { "-=", 16, BINARY, RIGHT_TO_LEFT }, @@ -218,6 +218,12 @@ bool Assignment::Target::operator<(const Target &other) const } +void TernaryExpression::visit(NodeVisitor &visitor) +{ + visitor.visit(*this); +} + + FunctionCall::FunctionCall(): constructor(false), declaration(0)