8#ifndef SKSL_FLOATLITERAL
9#define SKSL_FLOATLITERAL
63 SkASSERTF(value <= type->maximumValue(),
"Value %" PRId64
" does not fit in type %s",
123 return std::make_unique<Literal>(
pos, this->
value(), &this->
type());
#define SkASSERTF(cond, fmt,...)
const std::unique_ptr< Type > fFloatLiteral
const std::unique_ptr< Type > fIntLiteral
const std::unique_ptr< Type > fBool
const BuiltinTypes & fTypes
Expression(Position pos, Kind kind, const Type *type)
const Type & type() const
std::string description() const final
static std::unique_ptr< Literal > MakeInt(const Context &context, Position pos, SKSL_INT value)
bool supportsConstantValues() const override
ComparisonResult compareConstant(const Expression &other) const override
static std::unique_ptr< Literal > MakeBool(const Context &context, Position pos, bool value)
Literal(Position pos, double value, const Type *type)
SKSL_INT boolValue() const
static std::unique_ptr< Literal > Make(Position pos, double value, const Type *type)
static std::unique_ptr< Literal > MakeFloat(const Context &context, Position pos, float value)
std::unique_ptr< Expression > clone(Position pos) const override
static std::unique_ptr< Literal > MakeInt(Position pos, SKSL_INT value, const Type *type)
SKSL_INT intValue() const
static constexpr Kind kIRNodeKind
static std::unique_ptr< Literal > MakeFloat(Position pos, float value, const Type *type)
static std::unique_ptr< Literal > MakeBool(Position pos, bool value, const Type *type)
std::optional< double > getConstantValue(int n) const override
virtual NumberKind numberKind() const
std::string description() const override
virtual double minimumValue() const