Ignore:
Timestamp:
Oct 29, 2019, 4:01:24 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
773db65, 9421f3d8
Parents:
7951100 (diff), 8364209 (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 plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.h

    r7951100 rb067d9b  
    1010// Created On       : Sun May 17 12:18:34 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 09:36:57 2017
    13 // Update Count     : 3
     12// Last Modified On : Mon Feb 18 20:40:38 2019
     13// Update Count     : 4
    1414//
    1515
    1616#pragma once
    1717
    18 #include <list>  // for list
     18#include <list>          // for list
     19
     20#include "AST/Node.hpp"  // for ptr
    1921
    2022class ConstructorInit;
     
    2325class StmtExpr;
    2426namespace SymTab {
    25 class Indexer;
    26 }  // namespace SymTab
     27        class Indexer;
     28} // namespace SymTab
     29
     30namespace ast {
     31        class ConstructorInit;
     32        class Decl;
     33        class DeletedExpr;
     34        class Init;
     35        class StmtExpr;
     36        class SymbolTable;
     37        class Type;
     38        class TypeEnvironment;
     39} // namespace ast
    2740
    2841namespace ResolvExpr {
    2942        /// Checks types and binds syntactic constructs to typed representations
    3043        void resolve( std::list< Declaration * > translationUnit );
    31         void resolveDecl( Declaration *, const SymTab::Indexer &indexer );
    32         Expression *resolveInVoidContext( Expression * expr, const SymTab::Indexer &indexer );
    33         void findVoidExpression( Expression *& untyped, const SymTab::Indexer &indexer );
    34         void findSingleExpression( Expression *& untyped, const SymTab::Indexer &indexer );
    35         void findSingleExpression( Expression *& untyped, Type * type, const SymTab::Indexer &indexer );
     44        void resolveDecl( Declaration *, const SymTab::Indexer & indexer );
     45        Expression *resolveInVoidContext( Expression * expr, const SymTab::Indexer & indexer );
     46        void findVoidExpression( Expression *& untyped, const SymTab::Indexer & indexer );
     47        void findSingleExpression( Expression *& untyped, const SymTab::Indexer & indexer );
     48        void findSingleExpression( Expression *& untyped, Type * type, const SymTab::Indexer & indexer );
    3649        void resolveCtorInit( ConstructorInit * ctorInit, const SymTab::Indexer & indexer );
    3750        void resolveStmtExpr( StmtExpr * stmtExpr, const SymTab::Indexer & indexer );
     51        /// Searches expr and returns the first DeletedExpr found, otherwise nullptr
     52        DeletedExpr * findDeletedExpr( Expression * expr );
     53        /// Resolves with-stmts and with-clauses on functions
     54        void resolveWithExprs( std::list< Declaration * > & translationUnit );
     55
     56        /// Checks types and binds syntactic constructs to typed representations
     57        void resolve( std::list< ast::ptr<ast::Decl> >& translationUnit );
     58        /// Searches expr and returns the first DeletedExpr found, otherwise nullptr
     59        const ast::DeletedExpr * findDeletedExpr( const ast::Expr * expr );
     60        /// Find the expression candidate that is the unique best match for `untyped` in a `void`
     61        /// context.
     62        ast::ptr< ast::Expr > resolveInVoidContext(
     63                const ast::Expr * expr, const ast::SymbolTable & symtab, ast::TypeEnvironment & env );
     64        /// Resolve `untyped` to the single expression whose candidate is the best match for the
     65        /// given type.
     66        ast::ptr< ast::Expr > findSingleExpression(
     67                const ast::Expr * untyped, const ast::Type * type, const ast::SymbolTable & symtab );
     68        /// Resolves a constructor init expression
     69        ast::ptr< ast::Init > resolveCtorInit(
     70                const ast::ConstructorInit * ctorInit, const ast::SymbolTable & symtab );
     71        /// Resolves a statement expression
     72        ast::ptr< ast::Expr > resolveStmtExpr(
     73                const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab );
    3874} // namespace ResolvExpr
    3975
Note: See TracChangeset for help on using the changeset viewer.