Changeset 835d6e8 for src/Parser


Ignore:
Timestamp:
Apr 5, 2023, 4:45:38 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
c468150
Parents:
3e94a23
Message:

ast::SuspendStmt::Type -> ::Kind, this fits the new convention where Type is limited for actual compiler types.

Location:
src/Parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r3e94a23 r835d6e8  
    437437ast::Stmt * build_asm( const CodeLocation &, bool voltile, ast::Expr * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );
    438438ast::Stmt * build_directive( const CodeLocation &, std::string * directive );
    439 ast::SuspendStmt * build_suspend( const CodeLocation &, StatementNode *, ast::SuspendStmt::Type );
     439ast::SuspendStmt * build_suspend( const CodeLocation &, StatementNode *, ast::SuspendStmt::Kind );
    440440ast::WaitForStmt * build_waitfor( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, ExpressionNode * targetExpr, StatementNode * stmt );
    441441ast::WaitForStmt * build_waitfor_else( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, StatementNode * stmt );
  • src/Parser/StatementNode.cc

    r3e94a23 r835d6e8  
    362362} // build_finally
    363363
    364 ast::SuspendStmt * build_suspend( const CodeLocation & location, StatementNode * then, ast::SuspendStmt::Type type ) {
     364ast::SuspendStmt * build_suspend( const CodeLocation & location, StatementNode * then, ast::SuspendStmt::Kind kind ) {
    365365        std::vector<ast::ptr<ast::Stmt>> stmts;
    366366        buildMoveList( then, stmts );
     
    370370                then2 = stmts.front().strict_as<ast::CompoundStmt>();
    371371        }
    372         auto node = new ast::SuspendStmt( location, then2, ast::SuspendStmt::None );
    373         node->type = type;
    374         return node;
     372        return new ast::SuspendStmt( location, then2, kind );
    375373} // build_suspend
    376374
Note: See TracChangeset for help on using the changeset viewer.