Skip to content

Commit cac1f52

Browse files
authored
Merge pull request #1 from Tolc-Software/ids
Ids
2 parents 7bf7902 + 6236b0c commit cac1f52

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
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.14.0
5+
VERSION 0.15.0
66
LANGUAGES CXX)
77

88
configure_file(docs/ReleaseNotes/version.in

docs/ReleaseNotes/v0.15.0.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# News #
2+
3+
## Features ##
4+
5+
* Add support for unique ids on structures
6+
7+
* Remove unnecessary fields from function arguments

include/IR/ir.hpp

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ struct Enum {
130130
std::string m_documentation;
131131
// Unscoped values
132132
std::vector<std::string> m_values;
133+
134+
size_t m_id;
133135
// True if it was declared as 'enum class'
134136
bool m_isScoped;
135137
};
@@ -189,13 +191,23 @@ struct Type {
189191
bool m_isReference;
190192
};
191193

194+
struct Argument {
195+
// Name that should be used to access the variable
196+
std::string m_name;
197+
198+
Type m_type;
199+
};
200+
192201
struct Variable {
193202
// Name that should be used to access the variable
194203
std::string m_name;
204+
205+
Type m_type;
206+
195207
// Documentation string
196208
std::string m_documentation;
197209

198-
Type m_type;
210+
size_t m_id;
199211
};
200212

201213
struct Function {
@@ -211,7 +223,9 @@ struct Function {
211223

212224
Type m_returnType;
213225

214-
std::vector<Variable> m_arguments;
226+
size_t m_id;
227+
228+
std::vector<Argument> m_arguments;
215229

216230
// Is empty if function is not a template
217231
std::vector<Type> m_templateArguments;
@@ -254,6 +268,8 @@ struct Struct {
254268
// Is empty if struct is not a template
255269
std::vector<Type> m_templateArguments;
256270

271+
size_t m_id;
272+
257273
bool m_hasImplicitDefaultConstructor;
258274
};
259275

0 commit comments

Comments
 (0)