Skip to content

Commit 8f78a16

Browse files
committed
Document each CodeRange value
1 parent 5efa831 commit 8f78a16

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main/java/org/truffleruby/core/rope/CodeRange.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,22 @@
1717
import com.oracle.truffle.api.CompilerDirectives;
1818

1919
public enum CodeRange {
20+
/**
21+
* Used for {@link NativeRope}, where the bytes can change from real native code.
22+
* Also used when building a new {@link Rope} and the code range is unknown.
23+
*/
2024
CR_UNKNOWN(0),
25+
/**
26+
* Only used for ASCII-compatible encodings, when all characters are US-ASCII (7-bit).
27+
*/
2128
CR_7BIT(1),
29+
/**
30+
* All characters are valid, but at least one non-7-bit character.
31+
*/
2232
CR_VALID(2),
33+
/**
34+
* At least one character is not valid in the encoding of that Rope.
35+
*/
2336
CR_BROKEN(3);
2437

2538
private final int value;

0 commit comments

Comments
 (0)