Christopher Wiley | f690be5 | 2015-09-14 15:19:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015, The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef AIDL_PARSE_HELPERS_H_ |
| 18 | #define AIDL_PARSE_HELPERS_H_ |
| 19 | |
Casey Dahlin | f2d23f7 | 2015-10-02 16:19:19 -0700 | [diff] [blame] | 20 | #include <string> |
| 21 | |
| 22 | #include "aidl_language.h" |
| 23 | |
Christopher Wiley | f690be5 | 2015-09-14 15:19:10 -0700 | [diff] [blame] | 24 | namespace android { |
| 25 | namespace aidl { |
| 26 | |
| 27 | // strips off the leading whitespace, the "import" text |
| 28 | // also returns whether it's a local or system import |
| 29 | // we rely on the input matching the import regex from below |
| 30 | char* parse_import_statement(const char* text); |
| 31 | |
Christopher Wiley | f690be5 | 2015-09-14 15:19:10 -0700 | [diff] [blame] | 32 | bool is_java_keyword(const char* str); |
| 33 | |
Casey Dahlin | 030977a | 2015-09-29 11:29:35 -0700 | [diff] [blame] | 34 | char* cpp_strdup(const char* in); |
| 35 | |
Casey Dahlin | f2d23f7 | 2015-10-02 16:19:19 -0700 | [diff] [blame] | 36 | std::string gather_comments(extra_text_type* extra); |
| 37 | |
Christopher Wiley | f690be5 | 2015-09-14 15:19:10 -0700 | [diff] [blame] | 38 | } // namespace android |
| 39 | } // namespace aidl |
| 40 | |
| 41 | #endif // AIDL_PARSE_HELPERS_H_ |