| 1 | package com.rox.cpu.mos6502.assembler; | |
| 2 | ||
| 3 | /** | |
| 4 | * A single non-blank, comment-stripped line of 6502 assembly source. | |
| 5 | * | |
| 6 | * @param lineNumber 1-based line number in the original source, for error reporting | |
| 7 | * @param label the label defined on this line (e.g. {@code "LOOP"} for {@code "LOOP: STA $00"}), or {@code null} | |
| 8 | * @param mnemonic the instruction mnemonic (e.g. {@code "STA"}), or {@code null} if this line only defines a label | |
| 9 | * @param operandText the raw, untyped operand text (e.g. {@code "$0200,X"}), or {@code ""} if there is none | |
| 10 | */ | |
| 11 | record SourceLine(int lineNumber, String label, String mnemonic, String operandText) { | |
| 12 | /** Does this line contain a reference label */ | |
| 13 | boolean isLabelled() { | |
| 14 |
2
1. isLabelled : replaced boolean return with true for com/rox/cpu/mos6502/assembler/SourceLine::isLabelled → KILLED 2. isLabelled : negated conditional → KILLED |
return label != null; |
| 15 | } | |
| 16 | ||
| 17 | /** Does this line contain code */ | |
| 18 | boolean containsCode() { | |
| 19 |
2
1. containsCode : replaced boolean return with true for com/rox/cpu/mos6502/assembler/SourceLine::containsCode → KILLED 2. containsCode : negated conditional → KILLED |
return mnemonic != null; |
| 20 | } | |
| 21 | } | |
Mutations | ||
| 14 |
1.1 2.2 |
|
| 19 |
1.1 2.2 |