source: src/ResolvExpr/Resolver.h @ 3c6e417

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 3c6e417 was 17a0ede2, checked in by Aaron Moss <a3moss@…>, 5 years ago

Further resolver porting; finish initial draft of expression handling

  • Property mode set to 100644
File size: 2.5 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// Resolver.h --
8//
9// Author           : Richard C. Bilson
10// Created On       : Sun May 17 12:18:34 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Mon Feb 18 20:40:38 2019
13// Update Count     : 4
14//
15
16#pragma once
17
18#include <list>          // for list
19
20#include "AST/Node.hpp"  // for ptr
21
22class ConstructorInit;
23class Declaration;
24class Expression;
25class StmtExpr;
26namespace SymTab {
27        class Indexer;
28} // namespace SymTab
29
30namespace ast {
31        class Decl;
32        class DeletedExpr;
33        class StmtExpr;
34        class SymbolTable;
35        class TypeEnvironment;
36} // namespace ast
37
38namespace ResolvExpr {
39        /// Checks types and binds syntactic constructs to typed representations
40        void resolve( std::list< Declaration * > translationUnit );
41        void resolveDecl( Declaration *, const SymTab::Indexer & indexer );
42        Expression *resolveInVoidContext( Expression * expr, const SymTab::Indexer & indexer );
43        void findVoidExpression( Expression *& untyped, const SymTab::Indexer & indexer );
44        void findSingleExpression( Expression *& untyped, const SymTab::Indexer & indexer );
45        void findSingleExpression( Expression *& untyped, Type * type, const SymTab::Indexer & indexer );
46        void resolveCtorInit( ConstructorInit * ctorInit, const SymTab::Indexer & indexer );
47        void resolveStmtExpr( StmtExpr * stmtExpr, const SymTab::Indexer & indexer );
48        /// Searches expr and returns the first DeletedExpr found, otherwise nullptr
49        DeletedExpr * findDeletedExpr( Expression * expr );
50        /// Resolves with-stmts and with-clauses on functions
51        void resolveWithExprs( std::list< Declaration * > & translationUnit );
52
53        /// Checks types and binds syntactic constructs to typed representations
54        void resolve( std::list< ast::ptr<ast::Decl> >& translationUnit );
55        /// Searches expr and returns the first DeletedExpr found, otherwise nullptr
56        const ast::DeletedExpr * findDeletedExpr( const ast::Expr * expr );
57        /// Find the expression candidate that is the unique best match for `untyped` in a `void`
58        /// context.
59        ast::ptr< ast::Expr > resolveInVoidContext(
60                const ast::Expr * expr, const ast::SymbolTable & symtab, ast::TypeEnvironment & env );
61        /// Resolves a statement expression
62        ast::ptr< ast::Expr > resolveStmtExpr( 
63                const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab );
64} // namespace ResolvExpr
65
66// Local Variables: //
67// tab-width: 4 //
68// mode: c++ //
69// compile-command: "make install" //
70// End: //
Note: See TracBrowser for help on using the repository browser.