Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/skia/skia/src/sksl/ir/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  SkSLExtension.cpp

  Sprache: C
 

/*
 * Copyright 2023 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#include "src/sksl/ir/SkSLExtension.h"

#include "include/private/base/SkAssert.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLErrorReporter.h"
#include "src/sksl/SkSLProgramSettings.h"

namespace SkSL {

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);
}

std::unique_ptr<Extension> Extension::Make(const Context& context,
                                           Position pos,
                                           std::string_view name) {
    SkASSERT(!ProgramConfig::IsRuntimeEffect(context.fConfig->fKind));
    return std::make_unique<SkSL::Extension>(pos, name);
}

}  // namespace SkSL

Messung V0.5 in Prozent
C=93 H=100 G=96

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.