gfx/angle/src/compiler/preprocessor/Macro.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/compiler/preprocessor/Macro.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     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_PREPROCESSOR_MACRO_H_
    1.11 +#define COMPILER_PREPROCESSOR_MACRO_H_
    1.12 +
    1.13 +#include <map>
    1.14 +#include <string>
    1.15 +#include <vector>
    1.16 +
    1.17 +namespace pp
    1.18 +{
    1.19 +
    1.20 +struct Token;
    1.21 +
    1.22 +struct Macro
    1.23 +{
    1.24 +    enum Type
    1.25 +    {
    1.26 +        kTypeObj,
    1.27 +        kTypeFunc
    1.28 +    };
    1.29 +    typedef std::vector<std::string> Parameters;
    1.30 +    typedef std::vector<Token> Replacements;
    1.31 +
    1.32 +    Macro() : predefined(false), disabled(false), type(kTypeObj) { }
    1.33 +    bool equals(const Macro& other) const;
    1.34 +
    1.35 +    bool predefined;
    1.36 +    mutable bool disabled;
    1.37 +
    1.38 +    Type type;
    1.39 +    std::string name;
    1.40 +    Parameters parameters;
    1.41 +    Replacements replacements;
    1.42 +};
    1.43 +
    1.44 +typedef std::map<std::string, Macro> MacroSet;
    1.45 +
    1.46 +}  // namespace pp
    1.47 +#endif  // COMPILER_PREPROCESSOR_MACRO_H_

mercurial