Changeset 8633f060 for src/Parser


Ignore:
Timestamp:
Apr 19, 2018, 6:11:14 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
88f15ae
Parents:
c28afead (diff), b03eed6 (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 plg2:software/cfa/cfa-cc

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    rc28afead r8633f060  
    414414} // build_cast
    415415
     416Expression * build_keyword_cast( KeywordCastExpr::Target target, ExpressionNode * expr_node ) {
     417        return new KeywordCastExpr( maybeMoveBuild< Expression >(expr_node), target );
     418}
     419
    416420Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ) {
    417421        return new VirtualCastExpr( maybeMoveBuild< Expression >( expr_node ), maybeMoveBuildType( decl_node ) );
  • src/Parser/ParseNode.h

    rc28afead r8633f060  
    179179
    180180Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
     181Expression * build_keyword_cast( KeywordCastExpr::Target target, ExpressionNode * expr_node );
    181182Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
    182183Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member );
  • src/Parser/parser.yy

    rc28afead r8633f060  
    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.