private void initIfFirstRun() {
if (indentations.isEmpty()) {
indentations.push(0);
// First invocation. Look for the first non-NL. Enqueue it, and possibly an indentation if that non-NL
// token doesn't start at char 0.
Token firstRealToken;
do {
firstRealToken = pullToken();
}
while(firstRealToken.getType() == nlToken);
if (firstRealToken.getCharPositionInLine() > 0) {
indentations.push(firstRealToken.getCharPositionInLine());
dentsBuffer.add(createToken(indentToken, firstRealToken));
}
dentsBuffer.add(firstRealToken);
}
}
DenterHelper.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:newton
作者:
评论列表
文章目录