Changeset eb779d5 for src/Parser


Ignore:
Timestamp:
Oct 9, 2023, 12:55:09 PM (8 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
26dfce5
Parents:
0d49efb
Message:

Implemented corun statement

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    r0d49efb reb779d5  
    498498} // build_mutex
    499499
     500ast::Stmt * build_corun( const CodeLocation & location, StatementNode * stmt ) {
     501        ast::Stmt * body = maybeMoveBuild( stmt );
     502        return new ast::CorunStmt( location, body );
     503} // build_corun
     504
    500505// Local Variables: //
    501506// tab-width: 4 //
  • src/Parser/StatementNode.h

    r0d49efb reb779d5  
    105105ast::Stmt * build_with( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
    106106ast::Stmt * build_mutex( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
     107ast::Stmt * build_corun( const CodeLocation &, StatementNode * stmt );
  • src/Parser/parser.yy

    r0d49efb reb779d5  
    17211721corun_statement:
    17221722        CORUN statement
    1723                 { SemanticError( yylloc, "corun statement is currently unimplemented." ); $$ = nullptr; }
     1723                { $$ = new StatementNode( build_corun( yylloc, $2 ) ); }
    17241724        ;
    17251725
Note: See TracChangeset for help on using the changeset viewer.