本文整理汇总了Java中jdk.nashorn.internal.ir.WhileNode.setFinish方法的典型用法代码示例。如果您正苦于以下问题:Java WhileNode.setFinish方法的具体用法?Java WhileNode.setFinish怎么用?Java WhileNode.setFinish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.nashorn.internal.ir.WhileNode
的用法示例。
在下文中一共展示了WhileNode.setFinish方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doStatement
import jdk.nashorn.internal.ir.WhileNode; //导入方法依赖的package包/类
/**
* ...IterationStatement :
* ...
* do Statement while( Expression ) ;
* ...
*
* See 12.6
*
* Parse DO WHILE statement.
*/
private void doStatement() {
// Capture DO token.
final long doToken = token;
// DO tested in the caller.
next();
WhileNode doWhileNode = new WhileNode(-1, doToken, Token.descPosition(doToken), true);
lc.push(doWhileNode);
try {
// Get DO body.
final Block body = getStatement();
expect(WHILE);
expect(LPAREN);
final int doLine = line;
final JoinPredecessorExpression test = joinPredecessorExpression();
expect(RPAREN);
if (type == SEMICOLON) {
endOfLine();
}
doWhileNode.setFinish(finish);
//line number is last
appendStatement(doWhileNode =
new WhileNode(doLine, doToken, finish, true).
setBody(lc, body).
setTest(lc, test));
} finally {
lc.pop(doWhileNode);
}
}
示例2: doStatement
import jdk.nashorn.internal.ir.WhileNode; //导入方法依赖的package包/类
/**
* ...IterationStatement :
* ...
* do Statement while( Expression ) ;
* ...
*
* See 12.6
*
* Parse DO WHILE statement.
*/
private void doStatement() {
// Capture DO token.
final long doToken = token;
// DO tested in the caller.
next();
WhileNode doWhileNode = new WhileNode(-1, doToken, Token.descPosition(doToken), true);
lc.push(doWhileNode);
try {
// Get DO body.
final Block body = getStatement();
expect(WHILE);
expect(LPAREN);
final int doLine = line;
final Expression test = expression();
expect(RPAREN);
if (type == SEMICOLON) {
endOfLine();
}
doWhileNode.setFinish(finish);
//line number is last
appendStatement(doWhileNode =
new WhileNode(doLine, doToken, finish, true).
setBody(lc, body).
setTest(lc, test));
} finally {
lc.pop(doWhileNode);
}
}
示例3: doStatement
import jdk.nashorn.internal.ir.WhileNode; //导入方法依赖的package包/类
/**
* ...IterationStatement :
* ...
* do Statement while( Expression ) ;
* ...
*
* See 12.6
*
* Parse DO WHILE statement.
*/
private void doStatement() {
// Capture DO token.
final int doLine = line;
final long doToken = token;
// DO tested in the caller.
next();
WhileNode doWhileNode = new WhileNode(doLine, doToken, Token.descPosition(doToken), true);
lc.push(doWhileNode);
try {
// Get DO body.
doWhileNode = doWhileNode.setBody(lc, getStatement());
expect(WHILE);
expect(LPAREN);
doWhileNode = doWhileNode.setTest(lc, expression());
expect(RPAREN);
if (type == SEMICOLON) {
endOfLine();
}
doWhileNode.setFinish(finish);
appendStatement(doWhileNode);
} finally {
lc.pop(doWhileNode);
}
}