~VarDeclaration() override { // Unhook this VarDeclaration from its associated Variable, since we're being deleted.
if (fVar) {
fVar->detachDeadVarDeclaration();
}
}
// Checks the modifiers, baseType, and storage for compatibility with one another and reports // errors if needed. This method is implicitly called during Convert(), but is also explicitly // called while processing interface block fields. staticvoid ErrorCheck(const Context& context, Position pos, Position modifiersPosition, const Layout& layout, ModifierFlags modifierFlags, const Type* type, const Type* baseType, Variable::Storage storage);
// For use when no Variable yet exists. The newly-created variable will be added to the active // symbol table. Performs proper error checking and type coercion; reports errors via // ErrorReporter. static std::unique_ptr<VarDeclaration> Convert(const Context& context,
Position overallPos, const Modifiers& modifiers, const Type& type,
Position namePos,
std::string_view name,
VariableStorage storage,
std::unique_ptr<Expression> value);
// For use when a Variable already exists. The passed-in variable will be added to the active // symbol table. Performs proper error checking and type coercion; reports errors via // ErrorReporter. static std::unique_ptr<VarDeclaration> Convert(const Context& context,
std::unique_ptr<Variable> var,
std::unique_ptr<Expression> value);
// The symbol table is left as-is. Reports errors via ASSERT. static std::unique_ptr<VarDeclaration> Make(const Context& context,
Variable* var, const Type* baseType,
int arraySize,
std::unique_ptr<Expression> value); const Type& baseType() const { return fBaseType;
}
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.