Path: blob/main_old/src/compiler/preprocessor/DirectiveHandlerBase.h
1693 views
//1// Copyright 2012 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//56#ifndef COMPILER_PREPROCESSOR_DIRECTIVEHANDLERBASE_H_7#define COMPILER_PREPROCESSOR_DIRECTIVEHANDLERBASE_H_89#include <string>10#include "GLSLANG/ShaderLang.h"1112namespace angle13{1415namespace pp16{1718struct SourceLocation;1920// Base class for handling directives.21// Preprocessor uses this class to notify the clients about certain22// preprocessor directives. Derived classes are responsible for23// handling them in an appropriate manner.24class DirectiveHandler25{26public:27virtual ~DirectiveHandler();2829virtual void handleError(const SourceLocation &loc, const std::string &msg) = 0;3031// Handle pragma of form: #pragma name[(value)]32virtual void handlePragma(const SourceLocation &loc,33const std::string &name,34const std::string &value,35bool stdgl) = 0;3637virtual void handleExtension(const SourceLocation &loc,38const std::string &name,39const std::string &behavior) = 0;4041virtual void handleVersion(const SourceLocation &loc, int version, ShShaderSpec spec) = 0;42};4344} // namespace pp4546} // namespace angle4748#endif // COMPILER_PREPROCESSOR_DIRECTIVEHANDLERBASE_H_495051