Changeset c468150 for src/Parser/StatementNode.cc
- Timestamp:
- Apr 6, 2023, 10:13:38 AM (15 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 39b2403, fac05b3
- Parents:
- 835d6e8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/StatementNode.cc
r835d6e8 rc468150 15 15 // 16 16 17 #include "StatementNode.h" 18 17 19 #include <cassert> // for assert, strict_dynamic_cast, assertf 18 20 #include <memory> // for unique_ptr … … 23 25 #include "Common/SemanticError.h" // for SemanticError 24 26 #include "Common/utility.h" // for maybeMoveBuild, maybeBuild 25 #include "ParseNode.h" // for StatementNode, ExpressionNode, bui... 27 #include "DeclarationNode.h" // for DeclarationNode 28 #include "ExpressionNode.h" // for ExpressionNode 26 29 #include "parserutility.h" // for notZeroExpr 27 30 … … 52 55 stmt.reset( new ast::DeclStmt( declLocation, maybeMoveBuild( agg ) ) ); 53 56 } // StatementNode::StatementNode 57 58 StatementNode * StatementNode::add_label( 59 const CodeLocation & location, 60 const std::string * name, 61 DeclarationNode * attr ) { 62 stmt->labels.emplace_back( location, 63 *name, 64 attr ? std::move( attr->attributes ) 65 : std::vector<ast::ptr<ast::Attribute>>{} ); 66 delete attr; 67 delete name; 68 return this; 69 } 54 70 55 71 StatementNode * StatementNode::append_last_case( StatementNode * stmt ) {
Note: See TracChangeset
for help on using the changeset viewer.