use of org.develnext.jphp.core.tokenizer.TokenFinder in project jphp by jphp-compiler.
the class Token method of.
public static Token of(TokenMeta meta) {
TokenFinder finder = new TokenFinder();
Class<? extends Token> clazz = finder.find(meta);
try {
return clazz.getConstructor(TokenMeta.class).newInstance(meta);
} catch (InvocationTargetException e) {
throw new RuntimeException(e.getTargetException());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations