Path: blob/main_old/src/compiler/preprocessor/Macro.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_MACRO_H_7#define COMPILER_PREPROCESSOR_MACRO_H_89#include <map>10#include <memory>11#include <string>12#include <vector>1314namespace angle15{1617namespace pp18{1920struct Token;2122struct Macro23{24enum Type25{26kTypeObj,27kTypeFunc28};29typedef std::vector<std::string> Parameters;30typedef std::vector<Token> Replacements;3132Macro();33~Macro();34bool equals(const Macro &other) const;3536bool predefined;37mutable bool disabled;38mutable int expansionCount;3940Type type;41std::string name;42Parameters parameters;43Replacements replacements;44};4546typedef std::map<std::string, std::shared_ptr<Macro>> MacroSet;4748void PredefineMacro(MacroSet *macroSet, const char *name, int value);4950} // namespace pp5152} // namespace angle5354#endif // COMPILER_PREPROCESSOR_MACRO_H_555657