MCPcopy Create free account
hub / github.com/TASEmulators/fceux / Primitive

Function Primitive

src/conddebug.cpp:216–391  ·  view source on GitHub ↗

* Check for primitives * Flags, Registers, Numbers, Addresses and parentheses */

Source from the content-addressed store, hash-verified

214* Flags, Registers, Numbers, Addresses and parentheses
215*/
216static Condition* Primitive(const char** str, Condition* c)
217{
218 if (isFlag(next)) /* Flags */
219 {
220 if (c->type1 == TYPE_NO)
221 {
222 c->type1 = TYPE_FLAG;
223 c->value1 = next;
224 }
225 else
226 {
227 c->type2 = TYPE_FLAG;
228 c->value2 = next;
229 }
230
231 scan(str);
232
233 return c;
234 }
235 else if (isRegister(next)) /* Registers */
236 {
237 if (c->type1 == TYPE_NO)
238 {
239 c->type1 = TYPE_REG;
240 c->value1 = next;
241 }
242 else
243 {
244 c->type2 = TYPE_REG;
245 c->value2 = next;
246 }
247
248 scan(str);
249
250 return c;
251 }
252 else if (isPCBank(next)) /* PC Bank */
253 {
254 if (c->type1 == TYPE_NO)
255 {
256 c->type1 = TYPE_PC_BANK;
257 c->value1 = next;
258 }
259 else
260 {
261 c->type2 = TYPE_PC_BANK;
262 c->value2 = next;
263 }
264
265 scan(str);
266
267 return c;
268 }
269 else if (isDataBank(next)) /* Data Bank */
270 {
271 if (c->type1 == TYPE_NO)
272 {
273 c->type1 = TYPE_DATA_BANK;

Callers 1

TermFunction · 0.85

Calls 9

isFlagFunction · 0.85
scanFunction · 0.85
isRegisterFunction · 0.85
isPCBankFunction · 0.85
isDataBankFunction · 0.85
isValueReadFunction · 0.85
isValueWriteFunction · 0.85
getNumberFunction · 0.85
ParenthesesFunction · 0.85

Tested by

no test coverage detected