@@ -463,15 +463,9 @@ Expr ExprParser::parseExpr()
463463 {
464464 // now parse attribute list
465465 AttrMap attrs;
466- bool pushedScope = false ;
467466 // NOTE parsing attributes may trigger recursive calls to this
468467 // method.
469- parseAttributeList (Kind::NONE, ret, attrs, pushedScope);
470- // the scope of the variable is one level up
471- if (pushedScope && pstack.size ()>1 )
472- {
473- pstack[pstack.size ()-2 ].d_nscopes ++;
474- }
468+ parseAttributeList (Kind::NONE, ret, attrs);
475469 // process the attributes
476470 for (std::pair<const Attr, std::vector<Expr>>& a : attrs)
477471 {
@@ -1098,7 +1092,7 @@ std::string ExprParser::parseStr(bool unescape)
10981092}
10991093
11001094void ExprParser::parseAttributeList (
1101- Kind k, Expr& e, AttrMap& attrs, bool & pushedScope, Kind plk)
1095+ Kind k, Expr& e, AttrMap& attrs, Kind plk)
11021096{
11031097 std::map<std::string, Attr>::iterator its;
11041098 // while the next token is KEYWORD, exit if RPAREN
@@ -1237,17 +1231,6 @@ void ExprParser::parseAttributeList(
12371231 d_lex.reinsertToken (Token::RPAREN);
12381232}
12391233
1240- void ExprParser::parseAttributeList (Kind k, Expr& e, AttrMap& attrs, Kind plk)
1241- {
1242- bool pushedScope = false ;
1243- parseAttributeList (k, e, attrs, pushedScope, plk);
1244- // pop the scope if necessary
1245- if (pushedScope)
1246- {
1247- d_state.popScope ();
1248- }
1249- }
1250-
12511234Kind ExprParser::parseLiteralKind ()
12521235{
12531236 std::string name = parseSymbol ();
0 commit comments