某个编译原理的实验代码存档
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
compile-work/lexer/Token.cpp

30 lines
476 B

1 year ago
//
// Created by lenfrex on 2023/4/13.
//
#include "Token.h"
const Location &Token::getLocation() const {
return location;
}
void Token::setLocation(const Location &loc) {
Token::location = loc;
}
TokenType Token::getType() const {
return type;
}
void Token::setType(TokenType typ) {
Token::type = typ;
}
const std::string &Token::getContent() const {
return content;
}
void Token::setContent(const std::string &cont) {
Token::content = cont;
}