提交 395b87a9 编写于 作者: D DannyIsFunny

test=develop

上级 ae2c5f31
...@@ -60,6 +60,7 @@ Variable *Scope::FindLocalVar(const std::string &name) const { ...@@ -60,6 +60,7 @@ Variable *Scope::FindLocalVar(const std::string &name) const {
return nullptr; return nullptr;
} }
// AttributeVarNames will get persistive attribute names stored in parent scope
std::vector<std::string> Scope::AttributeVarNames() const { std::vector<std::string> Scope::AttributeVarNames() const {
std::vector<std::string> resulted_keys; std::vector<std::string> resulted_keys;
const Scope *cur_scope = this; const Scope *cur_scope = this;
...@@ -68,6 +69,11 @@ std::vector<std::string> Scope::AttributeVarNames() const { ...@@ -68,6 +69,11 @@ std::vector<std::string> Scope::AttributeVarNames() const {
auto keys = cur_scope->LocalVarNames(); auto keys = cur_scope->LocalVarNames();
resulted_keys.insert(resulted_keys.end(), keys.begin(), keys.end()); resulted_keys.insert(resulted_keys.end(), keys.begin(), keys.end());
} }
// remove feed and fetch
auto iter=std::find(resulted_keys.begin(), resulted_keys.end(), "feed");
resulted_keys.erase(iter);
iter=std::find(resulted_keys.begin(), resulted_keys.end(), "fetch");
resulted_keys.erase(iter);
return resulted_keys; return resulted_keys;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册