MCPcopy Create free account
hub / github.com/WheretIB/nullc / Compiler

Method Compiler

NULLC/Compiler.cpp:162–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}\r\n\
161\r\n\
162void ref() __redirect(auto ref r, int[] ref f);\r\n\
163// char inline array definition support\r\n\
164auto operator=(char[] ref dst, int[] src)\r\n\
165{\r\n\
166 if(dst.size < src.size)\r\n\
167 *dst = new char[src.size];\r\n\
168 for(int i = 0; i < src.size; i++)\r\n\
169 dst[i] = src[i];\r\n\
170 return dst;\r\n\
171}\r\n\
172// short inline array definition support\r\n\
173auto operator=(short[] ref dst, int[] src)\r\n\
174{\r\n\
175 if(dst.size < src.size)\r\n\
176 *dst = new short[src.size];\r\n\
177 for(int i = 0; i < src.size; i++)\r\n\
178 dst[i] = src[i];\r\n\
179 return dst;\r\n\
180}\r\n\
181// float inline array definition support\r\n\
182auto operator=(float[] ref dst, double[] src)\r\n\
183{\r\n\
184 if(dst.size < src.size)\r\n\
185 *dst = new float[src.size];\r\n\
186 for(int i = 0; i < src.size; i++)\r\n\
187 dst[i] = src[i];\r\n\
188 return dst;\r\n\
189}\r\n\
190// typeid retrieval from auto ref\r\n\
191typeid typeid(auto ref type);\r\n\
192int typeid.size();\r\n\
193// typeid comparison\r\n\
194int operator==(typeid a, b);\r\n\
195int operator!=(typeid a, b);\r\n\
196\r\n\
197int __rcomp(auto ref a, b);\r\n\
198int __rncomp(auto ref a, b);\r\n\
199\r\n\
200int __pcomp(void ref(int) a, void ref(int) b);\r\n\
201int __pncomp(void ref(int) a, void ref(int) b);\r\n\
202\r\n\
203int __acomp(auto[] a, b);\r\n\
204int __ancomp(auto[] a, b);\r\n\
205\r\n\
206int __typeCount();\r\n\
207\r\n\
208auto[] ref operator=(auto[] ref l, auto ref r);\r\n\
209auto ref operator=(auto ref l, auto[] ref r);\r\n\
210auto[] ref operator=(auto[] ref l, auto[] ref r);\r\n\
211auto ref operator[](auto[] ref l, int index);\r\n\
212// const string implementation\r\n\
213class const_string\r\n\
214{\r\n\
215 char[] arr;\r\n\
216 int size{ get{ return arr.size; } };\r\n\
217}\r\n\
218auto operator=(const_string ref l, char[] arr)\r\n\
219{\r\n\

Callers

nothing calls this directly

Calls 9

assertFunction · 0.85
AddMemberVariableMethod · 0.80
initMethod · 0.80
GetStreamSizeMethod · 0.80
clearMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected