Lines Matching defs:expr
170 void GLSLCodeGenerator::writeExpression(const Expression& expr, Precedence parentPrecedence) {
171 switch (expr.kind()) {
173 this->writeBinaryExpression(expr.as<BinaryExpression>(), parentPrecedence);
176 this->writeConstructorDiagonalMatrix(expr.as<ConstructorDiagonalMatrix>(),
180 this->writeExpression(*expr.as<ConstructorArrayCast>().argument(), parentPrecedence);
187 this->writeAnyConstructor(expr.asAnyConstructor(), parentPrecedence);
191 this->writeCastConstructor(expr.asAnyConstructor(), parentPrecedence);
194 this->writeFieldAccess(expr.as<FieldAccess>());
197 this->writeFunctionCall(expr.as<FunctionCall>());
200 this->writeLiteral(expr.as<Literal>());
203 this->writePrefixExpression(expr.as<PrefixExpression>(), parentPrecedence);
206 this->writePostfixExpression(expr.as<PostfixExpression>(), parentPrecedence);
209 this->writeSetting(expr.as<Setting>());
212 this->writeSwizzle(expr.as<Swizzle>());
215 this->writeVariableReference(expr.as<VariableReference>());
218 this->writeTernaryExpression(expr.as<TernaryExpression>(), parentPrecedence);
221 this->writeIndexExpression(expr.as<IndexExpression>());
224 SkDEBUGFAILF("unsupported expression: %s", expr.description().c_str());
229 static bool is_abs(Expression& expr) {
230 return expr.is<FunctionCall>() &&
231 expr.as<FunctionCall>().function().intrinsicKind() == k_abs_IntrinsicKind;
815 void GLSLCodeGenerator::writeIndexExpression(const IndexExpression& expr) {
816 this->writeExpression(*expr.base(), Precedence::kPostfix);
818 this->writeExpression(*expr.index(), Precedence::kTopLevel);