Ignore:
Timestamp:
May 17, 2015, 1:19:35 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
0dd3a2f
Parents:
b87a5ed
Message:

licencing: second groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/Tuples/NameMatcher.cc

    rb87a5ed ra32b204  
    66    : current( 0 ) {
    77    int cnt = 0;
    8     for( std::list< DeclarationWithType *>::const_iterator f = formals.begin(); f != formals.end(); ++f ) {
     8    for ( std::list< DeclarationWithType *>::const_iterator f = formals.begin(); f != formals.end(); ++f ) {
    99      table.insert( std::pair< std::string, int >( (*f)->get_name(), cnt++ ) );
    1010      index.push_back(*f);
     
    1616
    1717  void NameMatcher::match( ResolvExpr::AltList &alternatives ) throw (NoMatch) {
    18     if( alternatives.size() != index.size() )
     18    if ( alternatives.size() != index.size() )
    1919      throw NoMatch("Length of actuals and formals differ");
    2020
    21     for( ResolvExpr::AltList::const_iterator a = alternatives.begin(); a != alternatives.end(); ++a ) {
    22       if( a->expr->get_argName() != 0 )
     21    for ( ResolvExpr::AltList::const_iterator a = alternatives.begin(); a != alternatives.end(); ++a ) {
     22      if ( a->expr->get_argName() != 0 )
    2323        if ( NameExpr *name = dynamic_cast<NameExpr *>( a->expr->get_argName() ) ) {
    2424          if ( table.find( name->get_name() ) != table.end() ) {
     
    2727          } else
    2828            throw NoMatch( name->get_name() + "no such  designation" );
    29         } /*else if( TupleExpr *tup = dynamic_cast<TupleExpr *>( a->expr->get_argName() ) )
     29        } /*else if ( TupleExpr *tup = dynamic_cast<TupleExpr *>( a->expr->get_argName() ) )
    3030            std::cerr << "Designated expression" << std::endl; */
    3131      exprs.push_back( &(*a) );
     
    4141
    4242  ResolvExpr::Alternative &NameMatcher::get_next() throw (NoMoreElements) {
    43     if( current++ >= (int)(index.size()) )
     43    if ( current++ >= (int)(index.size()) )
    4444      throw NoMoreElements();
    4545    return *(new ResolvExpr::Alternative());
Note: See TracChangeset for help on using the changeset viewer.