Ignore:
Timestamp:
Apr 19, 2018, 5:18:46 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
da9d79b
Parents:
60ba456
Message:

Implement concurrency keyword casts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r60ba456 r9a705dc8  
    688688                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
    689689        | '(' COROUTINE '&' ')' cast_expression                         // CFA
    690                 { SemanticError( yylloc, "coroutine cast is currently unimplemented." ); $$ = nullptr; }
     690                { $$ = new ExpressionNode( build_keyword_cast( KeywordCastExpr::Coroutine, $5 ) ); }
    691691        | '(' THREAD '&' ')' cast_expression                            // CFA
    692                 { SemanticError( yylloc, "monitor cast is currently unimplemented." ); $$ = nullptr; }
     692                { $$ = new ExpressionNode( build_keyword_cast( KeywordCastExpr::Thread, $5 ) ); }
    693693        | '(' MONITOR '&' ')' cast_expression                           // CFA
    694                 { SemanticError( yylloc, "thread cast is currently unimplemented." ); $$ = nullptr; }
     694                { $$ = new ExpressionNode( build_keyword_cast( KeywordCastExpr::Monitor, $5 ) ); }
    695695                // VIRTUAL cannot be opt because of look ahead issues
    696696        | '(' VIRTUAL ')' cast_expression                                       // CFA
Note: See TracChangeset for help on using the changeset viewer.