source: src/AST/Type.hpp @ 1e97287

ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 1e97287 was 6d51bd7, checked in by Thierry Delisle <tdelisle@…>, 5 years ago

Fixes to the new templated pass and started on conversions

  • Property mode set to 100644
File size: 5.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// Type.hpp --
8//
9// Author           : Aaron B. Moss
10// Created On       : Thu May 9 10:00:00 2019
11// Last Modified By : Aaron B. Moss
12// Last Modified On : Thu May 9 10:00:00 2019
13// Update Count     : 1
14//
15
16#pragma once
17
18#include "Node.hpp"
19
20namespace ast {
21
22class Type : public Node {
23public:
24virtual const Type * accept( Visitor & v) const = 0;
25};
26
27
28
29//=================================================================================================
30/// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency
31/// remove only if there is a better solution
32/// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with
33/// forward declarations
34inline void increment( const class Type * /*node*/, Node::ref_type /*ref*/ ) { /*node->increment( ref );*/ }
35inline void decrement( const class Type * /*node*/, Node::ref_type /*ref*/ ) { /*node->decrement( ref );*/ }
36// inline void increment( const class VoidType * node, Node::ref_type ref ) { node->increment( ref ); }
37// inline void decrement( const class VoidType * node, Node::ref_type ref ) { node->decrement( ref ); }
38// inline void increment( const class BasicType * node, Node::ref_type ref ) { node->increment( ref ); }
39// inline void decrement( const class BasicType * node, Node::ref_type ref ) { node->decrement( ref ); }
40// inline void increment( const class PointerType * node, Node::ref_type ref ) { node->increment( ref ); }
41// inline void decrement( const class PointerType * node, Node::ref_type ref ) { node->decrement( ref ); }
42// inline void increment( const class ArrayType * node, Node::ref_type ref ) { node->increment( ref ); }
43// inline void decrement( const class ArrayType * node, Node::ref_type ref ) { node->decrement( ref ); }
44// inline void increment( const class ReferenceType * node, Node::ref_type ref ) { node->increment( ref ); }
45// inline void decrement( const class ReferenceType * node, Node::ref_type ref ) { node->decrement( ref ); }
46// inline void increment( const class QualifiedType * node, Node::ref_type ref ) { node->increment( ref ); }
47// inline void decrement( const class QualifiedType * node, Node::ref_type ref ) { node->decrement( ref ); }
48// inline void increment( const class FunctionType * node, Node::ref_type ref ) { node->increment( ref ); }
49// inline void decrement( const class FunctionType * node, Node::ref_type ref ) { node->decrement( ref ); }
50// inline void increment( const class ReferenceToType * node, Node::ref_type ref ) { node->increment( ref ); }
51// inline void decrement( const class ReferenceToType * node, Node::ref_type ref ) { node->decrement( ref ); }
52// inline void increment( const class StructInstType * node, Node::ref_type ref ) { node->increment( ref ); }
53// inline void decrement( const class StructInstType * node, Node::ref_type ref ) { node->decrement( ref ); }
54// inline void increment( const class UnionInstType * node, Node::ref_type ref ) { node->increment( ref ); }
55// inline void decrement( const class UnionInstType * node, Node::ref_type ref ) { node->decrement( ref ); }
56// inline void increment( const class EnumInstType * node, Node::ref_type ref ) { node->increment( ref ); }
57// inline void decrement( const class EnumInstType * node, Node::ref_type ref ) { node->decrement( ref ); }
58// inline void increment( const class TraitInstType * node, Node::ref_type ref ) { node->increment( ref ); }
59// inline void decrement( const class TraitInstType * node, Node::ref_type ref ) { node->decrement( ref ); }
60// inline void increment( const class TypeInstType * node, Node::ref_type ref ) { node->increment( ref ); }
61// inline void decrement( const class TypeInstType * node, Node::ref_type ref ) { node->decrement( ref ); }
62// inline void increment( const class TupleType * node, Node::ref_type ref ) { node->increment( ref ); }
63// inline void decrement( const class TupleType * node, Node::ref_type ref ) { node->decrement( ref ); }
64// inline void increment( const class TypeofType * node, Node::ref_type ref ) { node->increment( ref ); }
65// inline void decrement( const class TypeofType * node, Node::ref_type ref ) { node->decrement( ref ); }
66// inline void increment( const class AttrType * node, Node::ref_type ref ) { node->increment( ref ); }
67// inline void decrement( const class AttrType * node, Node::ref_type ref ) { node->decrement( ref ); }
68// inline void increment( const class VarArgsType * node, Node::ref_type ref ) { node->increment( ref ); }
69// inline void decrement( const class VarArgsType * node, Node::ref_type ref ) { node->decrement( ref ); }
70// inline void increment( const class ZeroType * node, Node::ref_type ref ) { node->increment( ref ); }
71// inline void decrement( const class ZeroType * node, Node::ref_type ref ) { node->decrement( ref ); }
72// inline void increment( const class OneType * node, Node::ref_type ref ) { node->increment( ref ); }
73// inline void decrement( const class OneType * node, Node::ref_type ref ) { node->decrement( ref ); }
74// inline void increment( const class GlobalScopeType * node, Node::ref_type ref ) { node->increment( ref ); }
75// inline void decrement( const class GlobalScopeType * node, Node::ref_type ref ) { node->decrement( ref ); }
76
77}
78
79// Local Variables: //
80// tab-width: 4 //
81// mode: c++ //
82// compile-command: "make install" //
83// End: //
Note: See TracBrowser for help on using the repository browser.