use of org.develnext.jphp.core.tokenizer.token.stmt.ThrowStmtToken in project jphp by jphp-compiler.
the class ThrowGenerator method getToken.
@Override
public ThrowStmtToken getToken(Token current, ListIterator<Token> iterator) {
if (current instanceof ThrowStmtToken) {
ThrowStmtToken result = (ThrowStmtToken) current;
ExprStmtToken exception = analyzer.generator(SimpleExprGenerator.class).getToken(nextToken(iterator), iterator, Separator.SEMICOLON, null);
if (exception == null)
unexpectedToken(iterator.previous());
result.setException(exception);
return result;
}
return null;
}
Aggregations