mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
777b182edd
This allowed me to standardize the sourcetar and sf/* scripts: the base directory (containing ./git) is now empty, except for maintenance scripts, while the source files and build scripts of the annotations are stored in a subdirectory of their own.
36 lines
658 B
C++
36 lines
658 B
C++
#ifndef INCLUDED_SEMANTIC_
|
|
#define INCLUDED_SEMANTIC_
|
|
|
|
#include <utility>
|
|
#include <string>
|
|
|
|
union Semantic
|
|
{
|
|
friend std::ostream &operator<<(std::ostream &out, Semantic const &obj);
|
|
|
|
std::pair<int, int> d_int;
|
|
std::pair<int, std::string> d_str;
|
|
|
|
public:
|
|
enum Type
|
|
{
|
|
INT,
|
|
IDENTIFIER
|
|
};
|
|
|
|
Semantic();
|
|
Semantic(Type type, char const *txt);
|
|
Semantic(Semantic const &other); // 2
|
|
~Semantic();
|
|
|
|
Semantic &operator=(Semantic const &rhs);
|
|
|
|
void swap(Semantic &other);
|
|
};
|
|
|
|
inline Semantic::Semantic()
|
|
:
|
|
d_int {INT, 0}
|
|
{}
|
|
|
|
#endif
|