Changeset b6fe7e6 for src/Parser


Ignore:
Timestamp:
Sep 9, 2016, 1:58:07 PM (9 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, resolv-new, with_gc
Children:
03e3117
Parents:
d1969a6
Message:

make constructor expressions work, fix bug with using the wrong TypeEnvironment on member exprs, remove many unnecessary ctor/dtors from the prelude

Location:
src/Parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.cc

    rd1969a6 rb6fe7e6  
    51115111    {
    51125112                        Token fn;
    5113                         fn.str = new std::string( "?{}" ); // location undefined
    5114                         (yyval.en) = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(1) - (4)].en) )->set_last( (yyvsp[(3) - (4)].en) ) ) );
     5113                        fn.str = new std::string( "?{}" ); // location undefined - use location of '{'?
     5114                        (yyval.en) = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(1) - (4)].en) )->set_last( (yyvsp[(3) - (4)].en) ) ) ) );
    51155115                }
    51165116    break;
  • src/Parser/parser.yy

    rd1969a6 rb6fe7e6  
    389389                {
    390390                        Token fn;
    391                         fn.str = new std::string( "?{}" ); // location undefined
    392                         $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) );
     391                        fn.str = new std::string( "?{}" ); // location undefined - use location of '{'?
     392                        $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) ) );
    393393                }
    394394        ;
Note: See TracChangeset for help on using the changeset viewer.