source: src/CodeGen/OperatorTable.h @ 98538288

arm-ehjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-expr
Last change on this file since 98538288 was 98538288, checked in by Thierry Delisle <tdelisle@…>, 22 months ago

Moved VerifyCtorDtorAssign? up and changed return type check to support the change.
fixes #158?

  • 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// OperatorTable.h --
8//
9// Author           : Richard C. Bilson
10// Created On       : Mon May 18 07:44:20 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Fri Jul 21 22:17:11 2017
13// Update Count     : 6
14//
15
16#pragma once
17
18#include <string>
19
20namespace CodeGen {
21        enum OperatorType {
22                OT_INDEX,
23                OT_CTOR,
24                OT_DTOR,
25                OT_CALL,
26                OT_PREFIX,
27                OT_POSTFIX,
28                OT_INFIX,
29                OT_PREFIXASSIGN,
30                OT_POSTFIXASSIGN,
31                OT_INFIXASSIGN,
32                OT_LABELADDRESS,
33                OT_CONSTANT
34        };
35
36        struct OperatorInfo {
37                std::string inputName;
38                std::string symbol;
39                std::string outputName;
40                std::string friendlyName;
41                OperatorType type;
42        };
43
44        bool isOperator( const std::string & funcName );
45        bool operatorLookup( const std::string & funcName, OperatorInfo & info );
46        std::string operatorFriendlyName( const std::string & funcName );
47
48        bool isConstructor( const std::string & );
49        bool isDestructor( const std::string & );
50        bool isAssignment( const std::string & );
51        bool isCtorDtor( const std::string & );
52        bool isCtorDtorAssign( const std::string & );
53} // namespace CodeGen
54
55// Local Variables: //
56// tab-width: 4 //
57// mode: c++ //
58// compile-command: "make install" //
59// End: //
Note: See TracBrowser for help on using the repository browser.