当前位置: 首页>>代码示例>>Java>>正文


Java Token.recast方法代码示例

本文整理汇总了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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:LiteralNode.java

示例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));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:SplitIntoFunctions.java

示例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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:LiteralNode.java

示例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;
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:15,代码来源:LiteralNode.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:LiteralNode.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:LiteralNode.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:LiteralNode.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:LiteralNode.java

示例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?
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:LiteralNode.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:LiteralNode.java

示例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;
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:12,代码来源:LiteralNode.java


注:本文中的jdk.nashorn.internal.parser.Token.recast方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。