mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-01 21:35:19 +00:00
Implement a lexer.
This commit is contained in:
26
src/org/nwapw/abacus/lexing/pattern/Match.java
Normal file
26
src/org/nwapw/abacus/lexing/pattern/Match.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package org.nwapw.abacus.lexing.pattern;
|
||||
|
||||
public class Match<T> {
|
||||
|
||||
private int from;
|
||||
private int to;
|
||||
private T type;
|
||||
|
||||
public Match(int from, int to, T type){
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getFrom() {
|
||||
return from;
|
||||
}
|
||||
|
||||
public int getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public T getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user