1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-06-28 21:56:23 -07:00
Abacus/src/org/nwapw/abacus/lexing/pattern/RangeNode.java

19 lines
345 B
Java
Raw Normal View History

package org.nwapw.abacus.lexing.pattern;
public class RangeNode<T> extends PatternNode<T> {
private char from;
private char to;
public RangeNode(char from, char to){
this.from = from;
this.to = to;
}
@Override
public boolean matches(char other) {
return other >= from && other <= to;
}
}