feat: better claiming method for tsrg

This commit is contained in:
zaaarf 2023-08-27 02:22:31 +02:00
parent 787fea3dd1
commit 8f122b540e
No known key found for this signature in database
GPG key ID: 6445A5CD15E5B40C

View file

@ -7,6 +7,7 @@ import ftbsc.lll.mapper.IMapper;
import ftbsc.lll.mapper.tools.data.ClassData; import ftbsc.lll.mapper.tools.data.ClassData;
import java.util.List; import java.util.List;
import java.util.regex.Pattern;
/** /**
* A {@link IMapper} capable of parsing TSRG (an intermediary * A {@link IMapper} capable of parsing TSRG (an intermediary
@ -18,7 +19,8 @@ public class TSRGMapper extends AbstractMapper {
@Override @Override
public boolean claim(List<String> lines) { public boolean claim(List<String> lines) {
return lines.get(0).startsWith("tsrg2 left right"); return Pattern.compile("tsrg2 [a-zA-Z]* [a-zA-Z]*")
.matcher(lines.get(0)).matches();
} }
@Override @Override