33 lines
541 B
C++
33 lines
541 B
C++
#include "global.h"
|
|
|
|
#include <tuple>
|
|
|
|
class tokens {
|
|
public:
|
|
enum type {
|
|
comment,
|
|
variable,
|
|
integer,
|
|
string,
|
|
construct
|
|
};
|
|
|
|
type tokenType;
|
|
char* tokenValue;
|
|
|
|
tokens( type aTokenType, char* aTokenValue ) {
|
|
tokenType = aTokenType;
|
|
tokenValue = aTokenValue;
|
|
}
|
|
};
|
|
|
|
|
|
tokens getTok( char code[] ) {
|
|
if( code[0] == '#' )
|
|
return tokens(tokens::comment, "");
|
|
return tokens(tokens::comment, "");
|
|
}
|
|
|
|
void compiler( char filename[] ) {
|
|
std::cout << getTok(filename).tokenType << ' ' << getTok(filename).tokenValue;
|
|
} |