Gyoji Compiler
|
Declares PUBLIC, PROTECTED, or PRIVATE access to functions and members. More...
#include <tree.hpp>
Public Types | |
enum | AccessModifierType { PUBLIC , PROTECTED , PRIVATE } |
Public Member Functions | |
AccessModifier (Gyoji::owned< Terminal > _modifier) | |
AccessModifier (const Gyoji::context::SourceReference &_source_ref) | |
~AccessModifier () | |
const AccessModifierType & | get_type () const |
![]() | |
SyntaxNode (Gyoji::context::TokenID _type, specific_type_t _data, const Gyoji::context::SourceReference &_source_ref) | |
const std::vector< std::reference_wrapper< const SyntaxNode > > & | get_children () const |
const Gyoji::context::TokenID & | get_type () const |
template<class T > | |
bool | has_data () const |
template<class T > | |
const T & | get_data () const |
const SyntaxNode & | get_syntax_node () const |
const Gyoji::context::SourceReference & | get_source_ref () const |
Declares PUBLIC, PROTECTED, or PRIVATE access to functions and members.
An access modifier is a declaration of the visibility of an object. If it is not specified, it is presumed to be public. If it is specified, then the protection will be evaluated by the namespace system according to where it is referenced with respect to where it is declared.
AccessModifier::AccessModifier | ( | Gyoji::owned< Terminal > | _modifier | ) |
Constructs an access modifier for the given terminal which will be either PUBLIC, PROTECTED, or PRIVATE.
AccessModifier::AccessModifier | ( | const Gyoji::context::SourceReference & | _source_ref | ) |
This is the default constructor used when the access modifier is not explicitly specified in the source file (i.e. optional).
AccessModifier::~AccessModifier | ( | ) |
Destructor, nothing special.
const AccessModifier::AccessModifierType & AccessModifier::get_type | ( | ) | const |
Returns the type of modifier applied.