school/cs236/submission/lab02/token.cpp
2016-04-06 20:46:32 -07:00

12 lines
521 B
C++

#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;
}