本文整理汇总了Java中jdk.nashorn.internal.parser.Token.recast方法的典型用法代码示例。如果您正苦于以下问题:Java Token.recast方法的具体用法?Java Token.recast怎么用?Java Token.recast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.nashorn.internal.parser.Token
的用法示例。
在下文中一共展示了Token.recast方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ArrayLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
/**
* Constructor
*
* @param token token
* @param finish finish
* @param value array literal value, a Node array
*/
protected ArrayLiteralNode(final long token, final int finish, final Expression[] value) {
super(Token.recast(token, TokenType.ARRAY), finish, value);
this.elementType = Type.UNKNOWN;
this.presets = null;
this.postsets = null;
this.units = null;
}
示例2: makeIfStateEquals
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
private static IfNode makeIfStateEquals(final int lineNumber, final long token, final int finish,
final int value, final Block pass, final Statement fail) {
return new IfNode(lineNumber, token, finish,
new BinaryNode(Token.recast(token, TokenType.EQ_STRICT),
GetSplitState.INSTANCE, intLiteral(value)),
pass,
fail == null ? null : new Block(NO_TOKEN, NO_FINISH, fail));
}
示例3: ArrayLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
/**
* Constructor
*
* @param token token
* @param finish finish
* @param value array literal value, a Node array
* @param hasSpread true if the array has a spread element
* @param hasTrailingComma true if the array literal has a comma after the last element
*/
protected ArrayLiteralNode(final long token, final int finish, final Expression[] value, final boolean hasSpread, final boolean hasTrailingComma) {
super(Token.recast(token, TokenType.ARRAY), finish, value);
this.elementType = Type.UNKNOWN;
this.presets = null;
this.postsets = null;
this.splitRanges = null;
this.hasSpread = hasSpread;
this.hasTrailingComma = hasTrailingComma;
}
示例4: ArrayLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
/**
* Constructor
*
* @param token token
* @param finish finish
* @param value array literal value, a Node array
*/
protected ArrayLiteralNode(final long token, final int finish, final Expression[] value) {
super(Token.recast(token, TokenType.ARRAY), finish, value);
this.elementType = Type.UNKNOWN;
this.presets = null;
this.postsets = null;
this.splitRanges = null;
}
示例5: BooleanLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
private BooleanLiteralNode(final long token, final int finish, final boolean value) {
super(Token.recast(token, value ? TokenType.TRUE : TokenType.FALSE), finish, value);
}
示例6: NumberLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
private NumberLiteralNode(final long token, final int finish, final Number value) {
super(Token.recast(token, TokenType.DECIMAL), finish, value);
}
示例7: UndefinedLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
private UndefinedLiteralNode(final long token, final int finish) {
super(Token.recast(token, TokenType.OBJECT), finish, ScriptRuntime.UNDEFINED);
}
示例8: StringLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
private StringLiteralNode(final long token, final int finish, final String value) {
super(Token.recast(token, TokenType.STRING), finish, value);
}
示例9: LexerTokenLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
private LexerTokenLiteralNode(final long token, final int finish, final LexerToken value) {
super(Token.recast(token, TokenType.STRING), finish, value); //TODO is string the correct token type here?
}
示例10: NullLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
private NullLiteralNode(final long token, final int finish) {
super(Token.recast(token, TokenType.OBJECT), finish, null);
}
示例11: ArrayLiteralNode
import jdk.nashorn.internal.parser.Token; //导入方法依赖的package包/类
/**
* Constructor
*
* @param token token
* @param finish finish
* @param value array literal value, a Node array
*/
protected ArrayLiteralNode(final long token, final int finish, final Expression[] value) {
super(Token.recast(token, TokenType.ARRAY), finish, value);
this.elementType = Type.UNKNOWN;
}