class Variable; enumclass OperatorPrecedence : uint8_t;
enumclass VariableRefKind : int8_t {
kRead,
kWrite,
kReadWrite, // taking the address of a variable - we consider this a read & write but don't complain if // the variable was not previously assigned
kPointer
};
/** * A reference to a variable, through which it can be read or written. In the statement: * * x = x + 1; * * there is only one Variable 'x', but two VariableReferences to it.
*/ class VariableReference final : public Expression { public: using RefKind = VariableRefKind;
// Creates a VariableReference. There isn't much in the way of error-checking or optimization // opportunities here. static std::unique_ptr<Expression> Make(Position pos, const Variable* variable,
RefKind refKind = RefKind::kRead) {
SkASSERT(variable); return std::make_unique<VariableReference>(pos, variable, refKind);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.