Ignore:
Timestamp:
May 30, 2019, 4:10:24 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8d70648
Parents:
eba615c
Message:

Stubs for new resolver, implementation of new indexer, type environment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/GenPoly.cc

    reba615c rd76c588  
    2424#include <vector>                       // for vector
    2525
     26#include "AST/Type.hpp"
    2627#include "GenPoly/ErasableScopedMap.h"  // for ErasableScopedMap<>::const_it...
    2728#include "ResolvExpr/typeops.h"         // for flatten
     
    262263                } else {
    263264                        return dynamic_cast< FunctionType* >( ty ); // pointer if FunctionType, NULL otherwise
     265                }
     266        }
     267
     268        const ast::FunctionType * getFunctionType( const ast::Type * ty ) {
     269                if ( auto pty = dynamic_cast< const ast::PointerType * >( ty ) ) {
     270                        return pty->base.as< ast::FunctionType >();
     271                } else {
     272                        return dynamic_cast< const ast::FunctionType * >( ty );
    264273                }
    265274        }
Note: See TracChangeset for help on using the changeset viewer.