19 lines
325 B
C++
19 lines
325 B
C++
#include "object.hh"
|
|
|
|
void Identifier::write(std::ostream &os) const {
|
|
os << identifier;
|
|
};
|
|
|
|
void StringLit::write(std::ostream &os) const {
|
|
os << literal;
|
|
};
|
|
|
|
void Number::write(std::ostream &os) const {
|
|
os << number;
|
|
};
|
|
|
|
std::ostream &operator<<(std::ostream &os, const Object &obj) {
|
|
obj.write(os);
|
|
return os;
|
|
}
|