We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d92d3c3 commit a4733d2Copy full SHA for a4733d2
assembly/nfa/matcher.ts
@@ -118,7 +118,7 @@ export class CharacterRangeMatcher extends Matcher {
118
119
matches(code: u32): bool {
120
for (let i = 0, len = this.ranges.length; i < len; i++) {
121
- if (code >= u32(this.ranges[i].from) && code <= u32(this.ranges[i].to)) {
+ if (this.ranges[i].contains(code)) {
122
return true;
123
}
124
assembly/util.ts
@@ -24,4 +24,8 @@ export class Range {
24
offset(value: i32): Range {
25
return new Range(this.from + value, this.to + value);
26
27
+
28
+ contains(value: i32): bool {
29
+ return value >= this.from && value <= this.to;
30
+ }
31
0 commit comments