Skip to content

Commit 7bf7902

Browse files
committed
Add support for more operators and polymorphic functions
1 parent 6eb2845 commit 7bf7902

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15...3.16)
22

33
project(
44
IR
5-
VERSION 0.13.0
5+
VERSION 0.14.0
66
LANGUAGES CXX)
77

88
configure_file(docs/ReleaseNotes/version.in

docs/ReleaseNotes/v0.14.0.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# News #
2+
3+
## Features ##
4+
5+
* Support for more operators:
6+
* +=
7+
* -=
8+
* *=
9+
* /=
10+
* %=
11+
* <<
12+
* >>
13+
* ++
14+
* --
15+
16+
* Add support for polymorphic functions

include/IR/ir.hpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ enum class Operator {
7979
Modulus,
8080
// =
8181
Assignment,
82+
// +=
83+
AddEqual,
84+
// -=
85+
SubEqual,
86+
// *=
87+
MulEqual,
88+
// /=
89+
DivEqual,
90+
// %=
91+
ModEqual,
8292
// ==
8393
Equal,
8494
// !=
@@ -91,12 +101,27 @@ enum class Operator {
91101
LessThan,
92102
// <=
93103
LessThanOrEqualTo,
104+
// <<
105+
LeftShift,
106+
// >>
107+
RightShift,
108+
// ++
109+
Increment,
110+
// --
111+
Decrement,
94112
// []
95113
Subscript,
96114
// ()
97115
Call
98116
};
99117

118+
enum class Polymorphic {
119+
// Not Applicable
120+
NA,
121+
Virtual,
122+
PureVirtual,
123+
};
124+
100125
struct Enum {
101126
std::string m_name;
102127
// Fully qualified name
@@ -191,6 +216,8 @@ struct Function {
191216
// Is empty if function is not a template
192217
std::vector<Type> m_templateArguments;
193218

219+
Polymorphic m_polymorphic;
220+
194221
bool m_isStatic;
195222
};
196223

0 commit comments

Comments
 (0)