forked from xxq250/Nasal-Interpreter
Delete nasal_token.h
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
#ifndef __NASAL_TOKEN_H__
|
||||
#define __NASAL_TOKEN_H__
|
||||
|
||||
#include "nasal_var.h"
|
||||
|
||||
//for token and lexer
|
||||
#define OPERATOR 1 //<2F><><EFBFBD><EFBFBD> or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define IDENTIFIER 2 //<2F>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6>
|
||||
#define NUMBER 3 //<2F><><EFBFBD><EFBFBD>
|
||||
#define RESERVEWORD 4 //<2F>ؼ<EFBFBD><D8BC><EFBFBD>
|
||||
#define STRING 5 //<2F>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
struct token_unit
|
||||
{
|
||||
int type;
|
||||
std::string content;
|
||||
int line;
|
||||
token_unit *next;
|
||||
};
|
||||
|
||||
class token_list
|
||||
{
|
||||
private:
|
||||
token_unit *head;
|
||||
int list_range;
|
||||
public:
|
||||
token_list();
|
||||
~token_list();
|
||||
token_unit* get_head();
|
||||
int get_list_range();
|
||||
void print_line_token(const int);
|
||||
void delete_all();
|
||||
void append(const int,const int,std::string&);
|
||||
void print();
|
||||
};
|
||||
|
||||
token_list nasal_lexer;
|
||||
#endif
|
||||
Reference in New Issue
Block a user