std::unique_ptr<Extension> Extension::Convert(const Context& context,
Position pos,
std::string_view name,
std::string_view behaviorText) { if (ProgramConfig::IsRuntimeEffect(context.fConfig->fKind)) { // Runtime Effects do not allow any #extensions.
context.fErrors->error(pos, "unsupported directive '#extension'"); return nullptr;
} if (behaviorText == "disable") { // We allow `#extension <name> : disable`, but it is a no-op. return nullptr;
} if (behaviorText != "require" && behaviorText != "enable" && behaviorText != "warn") {
context.fErrors->error(pos, "expected 'require', 'enable', 'warn', or 'disable'"); return nullptr;
} // We don't currently do anything different between `require`, `enable`, and `warn`. return Extension::Make(context, pos, name);
}
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.