blob: 07ecd2c9af94fabdb810e9363ae9048c1fabef1d [file] [log] [blame]
Christopher Wileyf690be52015-09-14 15:19:10 -07001/*
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 Dahlinf2d23f72015-10-02 16:19:19 -070020#include <string>
21
22#include "aidl_language.h"
23
Christopher Wileyf690be52015-09-14 15:19:10 -070024namespace android {
25namespace 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
30char* parse_import_statement(const char* text);
31
Christopher Wileyf690be52015-09-14 15:19:10 -070032bool is_java_keyword(const char* str);
33
Casey Dahlin030977a2015-09-29 11:29:35 -070034char* cpp_strdup(const char* in);
35
Casey Dahlinf2d23f72015-10-02 16:19:19 -070036std::string gather_comments(extra_text_type* extra);
37
Christopher Wileyf690be52015-09-14 15:19:10 -070038} // namespace android
39} // namespace aidl
40
41#endif // AIDL_PARSE_HELPERS_H_