return super.match(context);
}
Record rec = root;
int endIx = context.getCurrentIndex();
InputBuffer buffer = context.getInputBuffer();
char c = context.getCurrentChar();
loop:
while (true) {
char[] chars = rec.chars;
for (int i = 0; i < chars.length; i++) {
if (c == chars[i]) {
endIx++;
Record sub = rec.subs[i];
if (sub == null) {
break loop; // success, we complected a tree path to a leave
}
rec = sub;
c = buffer.charAt(endIx);
continue loop;
}
}
// we checked all sub branches of the current node, none matched, therefore fail
return false;