This commit is contained in:
q66 2016-08-12 04:02:05 +01:00
parent cd68185f40
commit 14c90e9da4

View file

@ -456,13 +456,21 @@ struct OSTD_EXPORT StackedValue: TaggedValue {
pop(); pop();
} }
bool alias(Ident *id) { bool set_id(Ident *id) {
p_id = id; p_id = id;
return p_id && p_id->is_alias(); return p_id && p_id->is_alias();
} }
bool alias(ostd::ConstCharRange name) { bool set_id(ostd::ConstCharRange name) {
return alias(p_cs.new_ident(name)); return set_id(p_cs.new_ident(name));
}
Ident *get_id() const {
return p_id;
}
bool has_id() const {
return p_id != nullptr;
} }
bool push() { bool push() {
@ -483,14 +491,6 @@ struct OSTD_EXPORT StackedValue: TaggedValue {
return true; return true;
} }
Ident *get_id() const {
return p_id;
}
bool has_id() const {
return p_id != nullptr;
}
private: private:
CsState &p_cs; CsState &p_cs;
Ident *p_id; Ident *p_id;