OSDN Git Service

Increment the version number.
[android-x86/external-swiftshader.git] / src / Radiance / compiler / preprocessor / DirectiveHandler.h
1 //\r
2 // Copyright (c) 2012 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_DIRECTIVE_HANDLER_H_\r
8 #define COMPILER_PREPROCESSOR_DIRECTIVE_HANDLER_H_\r
9 \r
10 #include <string>\r
11 \r
12 namespace pp\r
13 {\r
14 \r
15 struct SourceLocation;\r
16 \r
17 // Base class for handling directives.\r
18 // Preprocessor uses this class to notify the clients about certain\r
19 // preprocessor directives. Derived classes are responsible for\r
20 // handling them in an appropriate manner.\r
21 class DirectiveHandler\r
22 {\r
23   public:\r
24     virtual ~DirectiveHandler();\r
25 \r
26     virtual void handleError(const SourceLocation& loc,\r
27                              const std::string& msg) = 0;\r
28 \r
29     // Handle pragma of form: #pragma name[(value)]\r
30     virtual void handlePragma(const SourceLocation& loc,\r
31                               const std::string& name,\r
32                               const std::string& value) = 0;\r
33 \r
34     virtual void handleExtension(const SourceLocation& loc,\r
35                                  const std::string& name,\r
36                                  const std::string& behavior) = 0;\r
37 \r
38     virtual void handleVersion(const SourceLocation& loc,\r
39                                int version) = 0;\r
40 };\r
41 \r
42 }  // namespace pp\r
43 #endif  // COMPILER_PREPROCESSOR_DIRECTIVE_HANDLER_H_\r