Edit

kc3-lang/angle/src/compiler/DirectiveHandler.h

Branch :

  • Show log

    Commit

  • Author : shannon.woods%transgaming.com@gtempaccount.com
    Date : 2013-04-13 03:38:16
    Hash : 5524db0c
    Message : Add support for new ESSL 3.00 keywords. TRAC #22715 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2122 736b8ea6-26fd-11df-bfd4-992fa37f6226

  • src/compiler/DirectiveHandler.h
  • //
    // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    #ifndef COMPILER_DIRECTIVE_HANDLER_H_
    #define COMPILER_DIRECTIVE_HANDLER_H_
    
    #include "compiler/ExtensionBehavior.h"
    #include "compiler/Pragma.h"
    #include "compiler/preprocessor/DirectiveHandlerBase.h"
    
    class TDiagnostics;
    
    class TDirectiveHandler : public pp::DirectiveHandler
    {
      public:
        TDirectiveHandler(TExtensionBehavior& extBehavior,
                          TDiagnostics& diagnostics,
                          int& shaderVersion);
        virtual ~TDirectiveHandler();
    
        const TPragma& pragma() const { return mPragma; }
        const TExtensionBehavior& extensionBehavior() const { return mExtensionBehavior; }
    
        virtual void handleError(const pp::SourceLocation& loc,
                                 const std::string& msg);
    
        virtual void handlePragma(const pp::SourceLocation& loc,
                                  const std::string& name,
                                  const std::string& value);
    
        virtual void handleExtension(const pp::SourceLocation& loc,
                                     const std::string& name,
                                     const std::string& behavior);
    
        virtual void handleVersion(const pp::SourceLocation& loc,
                                   int version);
    
      private:
        TPragma mPragma;
        TExtensionBehavior& mExtensionBehavior;
        TDiagnostics& mDiagnostics;
        int& mShaderVersion;
    };
    
    #endif  // COMPILER_DIRECTIVE_HANDLER_H_