source: src/AST/DeclReplacer.hpp @ 7a15b7e

ADTast-experimentalenumforall-pointer-decaypthread-emulationqualifiedEnum
Last change on this file since 7a15b7e was 490fb92e, checked in by Fangren Yu <f37yu@…>, 4 years ago

move FixInit? to new ast

  • Property mode set to 100644
File size: 1.3 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// DeclReplacer.hpp --
8//
9// Author           : Aaron B. Moss
10// Created On       : Wed May 8 13:00:00 2019
11// Last Modified By : Aaron B. Moss
12// Last Modified On : Wed May 8 13:00:00 2019
13// Update Count     : 1
14//
15
16#pragma once
17
18#include <unordered_map>
19
20#include "Node.hpp"
21
22namespace ast {
23        class DeclWithType;
24        class TypeDecl;
25        class Expr;
26
27        namespace DeclReplacer {
28                using DeclMap = std::unordered_map< const DeclWithType *, const DeclWithType * >;
29                using TypeMap = std::unordered_map< const TypeDecl *, const TypeDecl * >;
30                using ExprMap = std::unordered_map< const DeclWithType *, const Expr * >;
31
32                const Node * replace( const Node * node, const DeclMap & declMap, bool debug = false );
33                const Node * replace( const Node * node, const TypeMap & typeMap, bool debug = false );
34                const Node * replace( const Node * node, const DeclMap & declMap, const TypeMap & typeMap, bool debug = false );
35                const Node * replace( const Node * node, const ExprMap & exprMap);
36        }
37}
38
39// Local Variables: //
40// tab-width: 4 //
41// mode: c++ //
42// compile-command: "make install" //
43// End: //
Note: See TracBrowser for help on using the repository browser.