Reshuffling directories to separate include and sources, part one.
[fail.git] / include / core / idlparser / astenumref.h
blob97629f5287d383be9ac5dd5c0f776b0786b8f73c
1 #ifndef AWFUL_IDLPARSE_ASTENUMREF_H_
2 #define AWFUL_IDLPARSE_ASTENUMREF_H_
4 #include "aststate.h"
6 namespace awful { namespace idlparser
8 // Grammar action functors used to build enum ref AST elements.
10 struct action_NewEnumRef
12 action_NewEnumRef( ASTState& State_ ) :
13 m_State( State_ )
17 template< typename TokenT > void operator()( const TokenT& tok ) const
19 // std::cout << "classref: " << first->get_value() << std::endl;
20 m_State.m_pCurrentEnumRef =
21 new idlast::EnumRef( tok.get_position().get_file().c_str(),
22 tok.get_position().get_line() );
24 m_State.m_pCurrentEnumRef->addComponent( tok.get_value().c_str() );
27 ASTState& m_State;
30 struct action_AddEnumRefComponent
32 action_AddEnumRefComponent( ASTState& State_ ) :
33 m_State( State_ )
37 template< typename TokenT > void operator()( const TokenT& tok ) const
39 m_State.m_pCurrentEnumRef->addComponent( tok.get_value().c_str() );
42 ASTState& m_State;
46 #endif