Display whether an assignment is to a local or global variable
This commit is contained in:
parent
dd98a34b63
commit
5c63b15ab7
|
@ -179,7 +179,13 @@ namespace Porygon::Binder {
|
||||||
|
|
||||||
void GetTreeString(std::stringstream& stream, size_t indents) const override{
|
void GetTreeString(std::stringstream& stream, size_t indents) const override{
|
||||||
DrawIndents(stream, indents);
|
DrawIndents(stream, indents);
|
||||||
stream << "Assignment -> " << _key->GetIdentifier()->GetDebugString() << endl;
|
stream << "Assignment -> ";
|
||||||
|
if (_key->GetScopeId() == 0){
|
||||||
|
stream << "global ";
|
||||||
|
} else{
|
||||||
|
stream << "local ";
|
||||||
|
}
|
||||||
|
stream << _key->GetIdentifier()->GetDebugString() << endl;
|
||||||
_expression->GetTreeString(stream, indents + 1);
|
_expression->GetTreeString(stream, indents + 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue