Parser: generate classes.
[fail.git] / src / idl / parser / state.h
blobd5a44f4b0595fd50153976fc426146f04cbb9003
1 /*
2 Fail game engine
3 Copyright 2007-2009 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_IDL_PARSER_STATE_H
20 #define FAIL_IDL_PARSER_STATE_H
22 namespace fail { namespace idlparser
24 struct State : pegtl::capture_map
26 State( shared_ptr< idlast::AST > pAST_ ) :
27 pAST( pAST_ ),
28 pCurrentNamespace( pAST_ )
29 /*m_bConstPointer( false ),
30 m_pCurrentFlags( &m_ClassFlags ),
31 m_bVirtualMethod( false )*/
33 // TODO: implement actions in the grammar to track this
34 // using the directives inserted by the preprocessor
35 // Also wrap eol into a rule that apply an action that increments the line number
36 CurrentFilename = "filename_nyi";
37 CurrentLine = 1;
40 shared_ptr< idlast::AST > pAST;
41 shared_ptr< idlast::Namespace > pCurrentNamespace;
42 shared_ptr< idlast::Class > pCurrentClass;
44 std::string CurrentFilename;
45 int CurrentLine;
49 #endif