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
55 lines (43 loc) · 1.69 KB
/
cppParser.h
File metadata and controls
55 lines (43 loc) · 1.69 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
53
// Filename: cppParser.h
// Created by: drose (19Oct99)
//
////////////////////////////////////////////////////////////////////
//
// 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."
//
////////////////////////////////////////////////////////////////////
#ifndef CPPPARSER_H
#define CPPPARSER_H
#include "dtoolbase.h"
#include "cppScope.h"
#include "cppPreprocessor.h"
#include "filename.h"
#include <set>
///////////////////////////////////////////////////////////////////
// Class : CPPParser
// Description :
////////////////////////////////////////////////////////////////////
class CPPParser : public CPPScope, public CPPPreprocessor {
public:
CPPParser();
virtual bool is_fully_specified() const;
bool parse_file(const Filename &filename);
CPPExpression *parse_expr(const string &expr);
CPPType *parse_type(const 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