source: src/ResolvExpr/Resolver.h@ b408364

ADT arm-eh ast-experimental enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since b408364 was 4b7cce6, checked in by Aaron Moss <a3moss@…>, 6 years ago

Fill in CandidateFinder boilerplate in resolver port

  • Property mode set to 100644
File size: 2.4 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 SymbolTable;
34 class TypeEnvironment;
35} // namespace ast
36
37namespace ResolvExpr {
38 /// Checks types and binds syntactic constructs to typed representations
39 void resolve( std::list< Declaration * > translationUnit );
40 void resolveDecl( Declaration *, const SymTab::Indexer & indexer );
41 Expression *resolveInVoidContext( Expression * expr, const SymTab::Indexer & indexer );
42 void findVoidExpression( Expression *& untyped, const SymTab::Indexer & indexer );
43 void findSingleExpression( Expression *& untyped, const SymTab::Indexer & indexer );
44 void findSingleExpression( Expression *& untyped, Type * type, const SymTab::Indexer & indexer );
45 void resolveCtorInit( ConstructorInit * ctorInit, const SymTab::Indexer & indexer );
46 void resolveStmtExpr( StmtExpr * stmtExpr, const SymTab::Indexer & indexer );
47 /// Searches expr and returns the first DeletedExpr found, otherwise nullptr
48 DeletedExpr * findDeletedExpr( Expression * expr );
49 /// Resolves with-stmts and with-clauses on functions
50 void resolveWithExprs( std::list< Declaration * > & translationUnit );
51
52 /// Checks types and binds syntactic constructs to typed representations
53 void resolve( std::list< ast::ptr<ast::Decl> >& translationUnit );
54 /// Searches expr and returns the first DeletedExpr found, otherwise nullptr
55 const ast::DeletedExpr * findDeletedExpr( const ast::Expr * expr );
56 /// Find the expression candidate that is the unique best match for `untyped` in a `void`
57 /// context.
58 ast::ptr< ast::Expr > resolveInVoidContext(
59 const ast::Expr * expr, const ast::SymbolTable & symtab, ast::TypeEnvironment & env );
60} // namespace ResolvExpr
61
62// Local Variables: //
63// tab-width: 4 //
64// mode: c++ //
65// compile-command: "make install" //
66// End: //
Note: See TracBrowser for help on using the repository browser.