12 lines
521 B
C++
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;
|
||
|
}
|