* Check for primitives * Flags, Registers, Numbers, Addresses and parentheses */
| 214 | * Flags, Registers, Numbers, Addresses and parentheses |
| 215 | */ |
| 216 | static 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; |
no test coverage detected