OSDN Git Service

Increment the version number.
[android-x86/external-swiftshader.git] / src / Radiance / compiler / preprocessor / Preprocessor.h
1 //\r
2 // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.\r
3 // Use of this source code is governed by a BSD-style license that can be\r
4 // found in the LICENSE file.\r
5 //\r
6 \r
7 #ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_\r
8 #define COMPILER_PREPROCESSOR_PREPROCESSOR_H_\r
9 \r
10 #include "pp_utils.h"\r
11 \r
12 namespace pp\r
13 {\r
14 \r
15 class Diagnostics;\r
16 class DirectiveHandler;\r
17 struct PreprocessorImpl;\r
18 struct Token;\r
19 \r
20 class Preprocessor\r
21 {\r
22   public:\r
23     Preprocessor(Diagnostics* diagnostics, DirectiveHandler* directiveHandler);\r
24     ~Preprocessor();\r
25 \r
26     // count: specifies the number of elements in the string and length arrays.\r
27     // string: specifies an array of pointers to strings.\r
28     // length: specifies an array of string lengths.\r
29     // If length is NULL, each string is assumed to be null terminated.\r
30     // If length is a value other than NULL, it points to an array containing\r
31     // a string length for each of the corresponding elements of string.\r
32     // Each element in the length array may contain the length of the\r
33     // corresponding string or a value less than 0 to indicate that the string\r
34     // is null terminated.\r
35     bool init(int count, const char* const string[], const int length[]);\r
36     // Adds a pre-defined macro.\r
37     void predefineMacro(const char* name, int value);\r
38 \r
39     void lex(Token* token);\r
40 \r
41   private:\r
42     PP_DISALLOW_COPY_AND_ASSIGN(Preprocessor);\r
43 \r
44     PreprocessorImpl* mImpl;\r
45 };\r
46 \r
47 }  // namespace pp\r
48 #endif  // COMPILER_PREPROCESSOR_PREPROCESSOR_H_\r
49 \r