Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/symbol.hpp"
Token or Atom with distinct identity.
It can be created from arbitrary strings, yet not altered
Definition at line 117 of file symbol.hpp.
Public Member Functions | |
Symbol (CStr lit=NULL) | |
Symbol (std::string &&definition) | |
create Symbol by symbol table lookup. More... | |
Symbol (std::string const &str) | |
Symbol (Literal const &base, std::string const &ext) | |
Symbol (Literal const &base, CStr ext) | |
Symbol (Symbol const &)=default | |
Symbol (Symbol &&)=default | |
bool | empty () const |
size_t | length () const |
operator bool () const | |
Symbol & | operator= (Symbol const &)=default |
Symbol & | operator= (Symbol &&)=default |
Public Member Functions inherited from Literal | |
Literal () noexcept | |
empty string by default More... | |
Literal (const char *literal) noexcept | |
Literal (Literal const &o) noexcept | |
const char * | c () const |
bool | empty () const |
operator CStr () const | |
bool | operator== (CStr cString) const |
equality on Literal and Symbol values is defined based on the content, not the address. More... | |
Static Public Attributes | |
static Symbol | ANY = "*" |
static Symbol | BOTTOM = "⟂" |
static Symbol | EMPTY = "" |
static Symbol | FAILURE = "↯" |
Additional Inherited Members | |
Protected Member Functions inherited from Literal | |
Literal & | operator= (CStr newStr) noexcept |
Assignment generally prohibited. | |
|
explicit |
create Symbol by symbol table lookup.
Definition at line 73 of file symbol-impl.cpp.