forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcppParser.h
More file actions
52 lines (42 loc) · 1.4 KB
/
cppParser.h
File metadata and controls
52 lines (42 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file cppParser.h
* @author drose
* @date 1999-10-19
*/
#ifndef CPPPARSER_H
#define CPPPARSER_H
#include "dtoolbase.h"
#include "cppScope.h"
#include "cppPreprocessor.h"
#include "filename.h"
#include <set>
/**
*
*/
class CPPParser : public CPPScope, public CPPPreprocessor {
public:
CPPParser();
virtual bool is_fully_specified() const;
bool parse_file(const Filename &filename);
CPPExpression *parse_expr(const std::string &expr);
CPPType *parse_type(const std::string &type);
};
/*
* Normally, this variable should be left true, especially while parsing.
* However, after parsing has finished, and you want to output the results of
* parsing in a way that can be successfully compiled by VC++, you may need to
* set this variable to false. It controls the way typenames are written.
* When true, class names are written 'class X', which is the way the parser
* expects things to come, and which compiles successfully under every
* compiler except VC++. When false, class names are written simply 'X',
* which is the only way they'll compile under VC++.
*/
extern bool cppparser_output_class_keyword;
#endif