adding cs236
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#include "token.h"
|
||||
|
||||
token::token(string type, string character, int line_num) :
|
||||
type(type), character(character), line_num(line_num) {}
|
||||
|
||||
ostream & operator<<(ostream & os, token tk) {
|
||||
os << "(" << tk.type
|
||||
<< ",\"" << tk.character
|
||||
<< "\"," << tk.line_num << ")";
|
||||
return os;
|
||||
}
|
||||
Reference in New Issue
Block a user