Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

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.3 Sekunden  ¤

*© 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=434850
#Domains=655579