acpa/include/token.h

41 lines
583 B
C++

#ifndef ACPA_TOKEN_H
#define ACPA_TOKEN_H
#include <string>
#include <vector>
enum class TokenType {
COMMA, // ,
SEMI, // ;
LB, // {
RB, // }
LP, // (
RP, // )
LT, // <
RT, // >
ASSIGN, // =
DOT, // .
COLON, // :
SCOPE, // ::
IMPLY, // ->
STRUCT, // struct
FN, // Fn
RETURN, // return
TYPEOF, // typeof
PRIVATE, // private
ADMIT, // admit
DELETE, // delete
ID, // identifier
EXCEED
};
extern std::string token_mp[];
extern std::vector<std::string> id_mp;
struct Token {
int line;
TokenType type;
int s;
};
#endif