gfx/angle/src/compiler/DirectiveHandler.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/compiler/DirectiveHandler.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +//
     1.5 +// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
     1.6 +// Use of this source code is governed by a BSD-style license that can be
     1.7 +// found in the LICENSE file.
     1.8 +//
     1.9 +
    1.10 +#ifndef COMPILER_DIRECTIVE_HANDLER_H_
    1.11 +#define COMPILER_DIRECTIVE_HANDLER_H_
    1.12 +
    1.13 +#include "compiler/ExtensionBehavior.h"
    1.14 +#include "compiler/Pragma.h"
    1.15 +#include "compiler/preprocessor/DirectiveHandlerBase.h"
    1.16 +
    1.17 +class TDiagnostics;
    1.18 +
    1.19 +class TDirectiveHandler : public pp::DirectiveHandler
    1.20 +{
    1.21 +  public:
    1.22 +    TDirectiveHandler(TExtensionBehavior& extBehavior,
    1.23 +                      TDiagnostics& diagnostics);
    1.24 +    virtual ~TDirectiveHandler();
    1.25 +
    1.26 +    const TPragma& pragma() const { return mPragma; }
    1.27 +    const TExtensionBehavior& extensionBehavior() const { return mExtensionBehavior; }
    1.28 +
    1.29 +    virtual void handleError(const pp::SourceLocation& loc,
    1.30 +                             const std::string& msg);
    1.31 +
    1.32 +    virtual void handlePragma(const pp::SourceLocation& loc,
    1.33 +                              const std::string& name,
    1.34 +                              const std::string& value);
    1.35 +
    1.36 +    virtual void handleExtension(const pp::SourceLocation& loc,
    1.37 +                                 const std::string& name,
    1.38 +                                 const std::string& behavior);
    1.39 +
    1.40 +    virtual void handleVersion(const pp::SourceLocation& loc,
    1.41 +                               int version);
    1.42 +
    1.43 +  private:
    1.44 +    TPragma mPragma;
    1.45 +    TExtensionBehavior& mExtensionBehavior;
    1.46 +    TDiagnostics& mDiagnostics;
    1.47 +};
    1.48 +
    1.49 +#endif  // COMPILER_DIRECTIVE_HANDLER_H_

mercurial