- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
struct LexicalToken
{
public:
LexicalToken(DataStructs::Lexem &lex,
SyntaxTree::SyntaxNode::Type type,
const IOSystem::Position &pos = IOSystem::Position()) :
lexem(lex), position(pos), type(type)
{}
LexicalToken(const LexicalToken &other) :
lexem(other.lexem), position(other.position), type(other.type)
{}
LexicalToken& operator = (const LexicalToken &other)
{
memcpy(this, &other, sizeof(LexicalToken));
return *this;
}
DataStructs::Lexem &lexem;
IOSystem::Position position;
SyntaxTree::SyntaxNode::Type type;
};