- Timestamp:
- Aug 14, 2023, 1:27:56 PM (2 years ago)
- Branches:
- master
- Children:
- 3543e99
- Parents:
- 89bef959 (diff), d32679d5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/ExceptDeclNew.cpp
r89bef959 r8d96dee 242 242 } 243 243 244 staticast::ObjectDecl * createExternVTable(244 ast::ObjectDecl * createExternVTable( 245 245 CodeLocation const & location, 246 246 std::string const & exceptionName, … … 453 453 std::string const & tableName = decl->name; 454 454 455 455 ast::ObjectDecl * retDecl; 456 456 if ( decl->storage.is_extern ) { 457 457 // Unique type-ids are only needed for polymorphic instances. … … 475 475 } 476 476 477 478 479 480 481 477 for ( ast::ptr<ast::Attribute> const & attr : decl->attributes ) { 478 retDecl->attributes.push_back( attr ); 479 } 480 481 return retDecl; 482 482 } 483 483 … … 485 485 ast::StructInstType const * postvisit( ast::VTableType const * type ) { 486 486 auto inst = type->base.as<ast::BaseInstType>(); 487 487 488 488 std::string vtableName = Virtual::vtableTypeName( inst->name ); 489 489 -
src/Parser/StatementNode.cc
r89bef959 r8d96dee 10 10 // Author : Rodolfo G. Esteves 11 11 // Created On : Sat May 16 14:59:41 2015 12 // Last Modified By : Andrew Beach13 // Last Modified On : Tue Apr 11 10:16:00202314 // Update Count : 42 812 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Fri Aug 11 11:44:15 2023 14 // Update Count : 429 15 15 // 16 16 … … 374 374 } 375 375 376 ast::WaitUntilStmt::ClauseNode * build_waituntil_timeout( const CodeLocation & loc, ExpressionNode * when, ExpressionNode * timeout, StatementNode * stmt ) {377 ast::WhenClause * clause = new ast::WhenClause( loc );378 clause->when_cond = notZeroExpr( maybeMoveBuild( when ) );379 clause->stmt = maybeMoveBuild( stmt );380 clause->target = maybeMoveBuild( timeout );381 return new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::TIMEOUT, clause );382 }383 384 376 ast::WaitUntilStmt * build_waituntil_stmt( const CodeLocation & loc, ast::WaitUntilStmt::ClauseNode * root ) { 385 377 ast::WaitUntilStmt * retStmt = new ast::WaitUntilStmt( loc ); -
src/Parser/StatementNode.h
r89bef959 r8d96dee 9 9 // Author : Andrew Beach 10 10 // Created On : Wed Apr 5 11:42:00 2023 11 // Last Modified By : Andrew Beach12 // Last Modified On : Tue Apr 11 9:43:00202313 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 11 11:44:07 2023 13 // Update Count : 2 14 14 // 15 15 … … 102 102 ast::WaitUntilStmt::ClauseNode * build_waituntil_clause( const CodeLocation &, ExpressionNode * when, ExpressionNode * targetExpr, StatementNode * stmt ); 103 103 ast::WaitUntilStmt::ClauseNode * build_waituntil_else( const CodeLocation &, ExpressionNode * when, StatementNode * stmt ); 104 ast::WaitUntilStmt::ClauseNode * build_waituntil_timeout( const CodeLocation &, ExpressionNode * when, ExpressionNode * timeout, StatementNode * stmt );105 104 ast::WaitUntilStmt * build_waituntil_stmt( const CodeLocation &, ast::WaitUntilStmt::ClauseNode * root ); 106 105 ast::Stmt * build_with( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt ); -
src/Parser/parser.yy
r89bef959 r8d96dee 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 12 23:06:44202313 // Update Count : 63 8912 // Last Modified On : Tue Jul 18 22:51:30 2023 13 // Update Count : 6391 14 14 // 15 15 … … 1708 1708 | wor_waituntil_clause wor when_clause_opt ELSE statement 1709 1709 { $$ = new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::LEFT_OR, $1, build_waituntil_else( yylloc, $3, maybe_build_compound( yylloc, $5 ) ) ); } 1710 | wor_waituntil_clause wor when_clause_opt timeout statement %prec THEN1711 { $$ = new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::LEFT_OR, $1, build_waituntil_timeout( yylloc, $3, $4, maybe_build_compound( yylloc, $5 ) ) ); }1712 // "else" must be conditional after timeout or timeout is never triggered (i.e., it is meaningless)1713 | wor_waituntil_clause wor when_clause_opt timeout statement wor ELSE statement // invalid syntax rule1714 { SemanticError( yylloc, "syntax error, else clause must be conditional after timeout or timeout never triggered." ); $$ = nullptr; }1715 | wor_waituntil_clause wor when_clause_opt timeout statement wor when_clause ELSE statement1716 { $$ = new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::LEFT_OR, $1,1717 new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::OR,1718 build_waituntil_timeout( yylloc, $3, $4, maybe_build_compound( yylloc, $5 ) ),1719 build_waituntil_else( yylloc, $7, maybe_build_compound( yylloc, $9 ) ) ) ); }1720 1710 ; 1721 1711 1722 1712 waituntil_statement: 1723 1713 wor_waituntil_clause %prec THEN 1724 // SKULLDUGGERY: create an empty compound statement to test parsing of waituntil statement. 1725 { 1726 $$ = new StatementNode( build_waituntil_stmt( yylloc, $1 ) ); 1727 // $$ = new StatementNode( build_compound( yylloc, nullptr ) ); 1728 } 1714 { $$ = new StatementNode( build_waituntil_stmt( yylloc, $1 ) ); } 1729 1715 ; 1730 1716
Note:
See TracChangeset
for help on using the changeset viewer.