Changeset 8a1d95af for src/Parser


Ignore:
Timestamp:
Aug 14, 2021, 8:48:49 AM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
f79ee0d
Parents:
c99a0d1 (diff), 6d63c14 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    rc99a0d1 r8a1d95af  
    437437WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when, StatementNode * else_stmt, ExpressionNode * else_when );
    438438Statement * build_with( ExpressionNode * exprs, StatementNode * stmt );
     439Statement * build_mutex( ExpressionNode * exprs, StatementNode * stmt );
    439440
    440441//##############################################################################
  • src/Parser/StatementNode.cc

    rc99a0d1 r8a1d95af  
    374374} // build_directive
    375375
     376Statement * build_mutex( ExpressionNode * exprs, StatementNode * stmt ) {
     377        std::list< Expression * > expList;
     378        buildMoveList( exprs, expList );
     379        Statement * body = maybeMoveBuild<Statement>( stmt );
     380        return new MutexStmt( body, expList );
     381} // build_mutex
     382
    376383// Local Variables: //
    377384// tab-width: 4 //
  • src/Parser/parser.yy

    rc99a0d1 r8a1d95af  
    13471347mutex_statement:
    13481348        MUTEX '(' argument_expression_list_opt ')' statement
    1349                 { SemanticError( yylloc, "Mutex statement is currently unimplemented." ); $$ = nullptr; }
     1349                { $$ = new StatementNode( build_mutex( $3, $5 ) ); }
    13501350        ;
    13511351
Note: See TracChangeset for help on using the changeset viewer.