The Psyche Project
Public Member Functions | List of all members
psy::C::Identifier Class Referencefinal

The Identifier class. More...

#include <Lexeme_Identifier.h>

Inheritance diagram for psy::C::Identifier:
psy::C::Lexeme psy::TextElement

Public Member Functions

 Identifier (const char *chars, unsigned int size)
 
virtual Identifier * asIdentifier () override
 
virtual const Identifier * asIdentifier () const override
 
- Public Member Functions inherited from psy::C::Lexeme
LexemeKind kind () const
 
std::string valueText () const
 
template<class ValueT >
ValueT value () const
 
template<>
int value () const
 
template<>
long value () const
 
template<>
long long value () const
 
template<>
unsigned long value () const
 
template<>
unsigned long long value () const
 
template<>
float value () const
 
template<>
double value () const
 
template<>
long double value () const
 
template<>
unsigned char value () const
 
template<>
wchar_t value () const
 
template<>
char16_t value () const
 
template<>
char32_t value () const
 
virtual IntegerConstant * asIntegerConstant ()
 
virtual const IntegerConstant * asIntegerConstant () const
 
virtual FloatingConstant * asFloatingConstant ()
 
virtual const FloatingConstant * asFloatingConstant () const
 
virtual CharacterConstant * asCharacterConstant ()
 
virtual const CharacterConstant * asCharacterConstant () const
 
virtual ImaginaryIntegerConstant * asImaginaryIntegerConstant ()
 
virtual const ImaginaryIntegerConstant * asImaginaryIntegerConstant () const
 
virtual ImaginaryFloatingConstant * asImaginaryFloatingConstant ()
 
virtual const ImaginaryFloatingConstant * asImaginaryFloatingConstant () const
 
virtual StringLiteral * asStringLiteral ()
 
virtual const StringLiteral * asStringLiteral () const
 
- Public Member Functions inherited from psy::TextElement
 TextElement (const char *c_str, unsigned int size)
 
 TextElement (const TextElement &other)=delete
 
void operator= (const TextElement &other)=delete
 
iterator begin () const
 
iterator end () const
 
char at (unsigned int idx) const
 
const char * c_str () const
 
unsigned int size () const
 
unsigned int length () const
 

Additional Inherited Members

- Public Types inherited from psy::C::Lexeme
enum  LexemeKind : std::uint16_t {
  Identifier, IntegerConstant, FloatingConstant, CharacterConstant,
  ImaginaryIntegerConstant, ImaginaryFloatingConstant, StringLiteral
}
 The LexemeKind enumeraiton.
 
- Public Types inherited from psy::TextElement
typedef const char * iterator
 
typedef iterator const_iterator
 
- Protected Member Functions inherited from psy::C::Lexeme
 Lexeme (const Lexeme &)=delete
 
Lexeme & operator= (const Lexeme &)=delete
 
 Lexeme (const char *chars, unsigned int size, LexemeKind kind)
 
- Protected Attributes inherited from psy::C::Lexeme
union {
   std::uint16_t   BF_all_
 
   BitFields   BF_
 
}; 
 

Detailed Description

The Identifier class.

Member Function Documentation

◆ asIdentifier() [1/2]

virtual const Identifier* psy::C::Identifier::asIdentifier ( ) const
inlineoverridevirtual

Cast this Lexeme as an Identifier.

Reimplemented from psy::C::Lexeme.

◆ asIdentifier() [2/2]

virtual Identifier* psy::C::Identifier::asIdentifier ( )
inlineoverridevirtual

Cast this Lexeme as an Identifier.

Reimplemented from psy::C::Lexeme.


The documentation for this class was generated from the following files: