Skip to content

Commit a30b60b

Browse files
authored
Update readme.md
1 parent e4385d0 commit a30b60b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Text file describing the tokens the Lexer uses and the rules the Parser follows.
5858
This file contains some example code that counts the number of primes from 1-1000.
5959
The Java code equivalent is also present in that file, in case the bytecode is confusing.
6060

61-
**Bad code:** *VMInstruction.java*. Personally I dislike how coupled this enum is to the different `Instruction` classes and the `ReflectionSupplier` class.
61+
**What I would change:** *VMInstruction.java*. Personally I dislike how coupled this enum is to the different `Instruction` classes and the `ReflectionSupplier` class.
6262
During development I thought about some different ideas and one of them was annotation pre-processing which would look something like this:
6363
```java
6464
@LinkVMInstruction("MyInstruction")
@@ -68,4 +68,4 @@ class MyInstruction extends Instruction {
6868
```
6969
The annotation pre-processor would then find all `Instruction`s with the @VMInstruction annotation and generate the `VMInstruction` enum file from
7070
scratch. Magic! I ended up going with the simple coupling solution anyways since I did not want to spend time implementing this for a minor coupling problem.
71-
I will definitely re-visit the magic of annotation pre-processors, though!
71+
I will definitely re-visit the magic of annotation pre-processors, though!

0 commit comments

Comments
 (0)