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


Java Token.LET属性代码示例

本文整理汇总了Java中org.mozilla.javascript.Token.LET属性的典型用法代码示例。如果您正苦于以下问题:Java Token.LET属性的具体用法?Java Token.LET怎么用?Java Token.LET使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.mozilla.javascript.Token的用法示例。


在下文中一共展示了Token.LET属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setNodeType

/**
 * Sets the node type.
 * @throws IllegalArgumentException if {@code nodeType} is not one of
 * {@link Token#VAR}, {@link Token#CONST}, or {@link Token#LET}
 */
public void setNodeType(int nodeType) {
    if (nodeType != Token.VAR
        && nodeType != Token.CONST
        && nodeType != Token.LET)
        throw new IllegalArgumentException("invalid node type");
    setType(nodeType);
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:12,代码来源:VariableInitializer.java

示例2: setType

/**
 * Sets the node type and returns this node.
 * @throws IllegalArgumentException if {@code declType} is invalid
 */
@Override
public org.mozilla.javascript.Node setType(int type) {
    if (type != Token.VAR
        && type != Token.CONST
        && type != Token.LET)
        throw new IllegalArgumentException("invalid decl type: " + type);
    return super.setType(type);
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:12,代码来源:VariableDeclaration.java

示例3: setDeclType

/**
 * Sets symbol declaration type
 */
public void setDeclType(int declType) {
    if (!(declType == Token.FUNCTION
          || declType == Token.LP
          || declType == Token.VAR
          || declType == Token.LET
          || declType == Token.CONST))
        throw new IllegalArgumentException("Invalid declType: " + declType);
    this.declType = declType;
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:12,代码来源:Symbol.java

示例4: hasSideEffects

@Override
public boolean hasSideEffects()
{
    switch (getType()) {
      case Token.ASSIGN:
      case Token.ASSIGN_ADD:
      case Token.ASSIGN_BITAND:
      case Token.ASSIGN_BITOR:
      case Token.ASSIGN_BITXOR:
      case Token.ASSIGN_DIV:
      case Token.ASSIGN_LSH:
      case Token.ASSIGN_MOD:
      case Token.ASSIGN_MUL:
      case Token.ASSIGN_RSH:
      case Token.ASSIGN_SUB:
      case Token.ASSIGN_URSH:
      case Token.BLOCK:
      case Token.BREAK:
      case Token.CALL:
      case Token.CATCH:
      case Token.CATCH_SCOPE:
      case Token.CONST:
      case Token.CONTINUE:
      case Token.DEC:
      case Token.DELPROP:
      case Token.DEL_REF:
      case Token.DO:
      case Token.ELSE:
      case Token.ENTERWITH:
      case Token.ERROR:         // Avoid cascaded error messages
      case Token.EXPORT:
      case Token.EXPR_RESULT:
      case Token.FINALLY:
      case Token.FUNCTION:
      case Token.FOR:
      case Token.GOTO:
      case Token.IF:
      case Token.IFEQ:
      case Token.IFNE:
      case Token.IMPORT:
      case Token.INC:
      case Token.JSR:
      case Token.LABEL:
      case Token.LEAVEWITH:
      case Token.LET:
      case Token.LETEXPR:
      case Token.LOCAL_BLOCK:
      case Token.LOOP:
      case Token.NEW:
      case Token.REF_CALL:
      case Token.RETHROW:
      case Token.RETURN:
      case Token.RETURN_RESULT:
      case Token.SEMI:
      case Token.SETELEM:
      case Token.SETELEM_OP:
      case Token.SETNAME:
      case Token.SETPROP:
      case Token.SETPROP_OP:
      case Token.SETVAR:
      case Token.SET_REF:
      case Token.SET_REF_OP:
      case Token.SWITCH:
      case Token.TARGET:
      case Token.THROW:
      case Token.TRY:
      case Token.VAR:
      case Token.WHILE:
      case Token.WITH:
      case Token.WITHEXPR:
      case Token.YIELD:
        return true;

      default:
        return false;
    }
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:77,代码来源:AstNode.java

示例5: isLet

/**
 * Returns true if this is a {@link Token#LET} declaration.
 */
public boolean isLet() {
    return type == Token.LET;
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:6,代码来源:VariableDeclaration.java

示例6: hasSideEffects

public boolean hasSideEffects()
{
    switch (getType()) {
      case Token.ASSIGN:
      case Token.ASSIGN_ADD:
      case Token.ASSIGN_BITAND:
      case Token.ASSIGN_BITOR:
      case Token.ASSIGN_BITXOR:
      case Token.ASSIGN_DIV:
      case Token.ASSIGN_LSH:
      case Token.ASSIGN_MOD:
      case Token.ASSIGN_MUL:
      case Token.ASSIGN_RSH:
      case Token.ASSIGN_SUB:
      case Token.ASSIGN_URSH:
      case Token.BLOCK:
      case Token.BREAK:
      case Token.CALL:
      case Token.CATCH:
      case Token.CATCH_SCOPE:
      case Token.CONST:
      case Token.CONTINUE:
      case Token.DEC:
      case Token.DELPROP:
      case Token.DEL_REF:
      case Token.DO:
      case Token.ELSE:
      case Token.ENTERWITH:
      case Token.ERROR:         // Avoid cascaded error messages
      case Token.EXPORT:
      case Token.EXPR_RESULT:
      case Token.FINALLY:
      case Token.FUNCTION:
      case Token.FOR:
      case Token.GOTO:
      case Token.IF:
      case Token.IFEQ:
      case Token.IFNE:
      case Token.IMPORT:
      case Token.INC:
      case Token.JSR:
      case Token.LABEL:
      case Token.LEAVEWITH:
      case Token.LET:
      case Token.LETEXPR:
      case Token.LOCAL_BLOCK:
      case Token.LOOP:
      case Token.NEW:
      case Token.REF_CALL:
      case Token.RETHROW:
      case Token.RETURN:
      case Token.RETURN_RESULT:
      case Token.SEMI:
      case Token.SETELEM:
      case Token.SETELEM_OP:
      case Token.SETNAME:
      case Token.SETPROP:
      case Token.SETPROP_OP:
      case Token.SETVAR:
      case Token.SET_REF:
      case Token.SET_REF_OP:
      case Token.SWITCH:
      case Token.TARGET:
      case Token.THROW:
      case Token.TRY:
      case Token.VAR:
      case Token.WHILE:
      case Token.WITH:
      case Token.WITHEXPR:
      case Token.YIELD:
        return true;

      default:
        return false;
    }
}
 
开发者ID:middle2tw,项目名称:whackpad,代码行数:76,代码来源:AstNode.java

示例7: hasSideEffects

@Override
public boolean hasSideEffects()
  {
      switch (getType()) {
        case Token.ASSIGN:
        case Token.ASSIGN_ADD:
        case Token.ASSIGN_BITAND:
        case Token.ASSIGN_BITOR:
        case Token.ASSIGN_BITXOR:
        case Token.ASSIGN_DIV:
        case Token.ASSIGN_LSH:
        case Token.ASSIGN_MOD:
        case Token.ASSIGN_MUL:
        case Token.ASSIGN_RSH:
        case Token.ASSIGN_SUB:
        case Token.ASSIGN_URSH:
        case Token.BLOCK:
        case Token.BREAK:
        case Token.CALL:
        case Token.CATCH:
        case Token.CATCH_SCOPE:
        case Token.CONST:
        case Token.CONTINUE:
        case Token.DEC:
        case Token.DELPROP:
        case Token.DEL_REF:
        case Token.DO:
        case Token.ELSE:
        case Token.ENTERWITH:
        case Token.ERROR:         // Avoid cascaded error messages
        case Token.EXPORT:
        case Token.EXPR_RESULT:
        case Token.FINALLY:
        case Token.FUNCTION:
        case Token.FOR:
        case Token.GOTO:
        case Token.IF:
        case Token.IFEQ:
        case Token.IFNE:
        case Token.IMPORT:
        case Token.INC:
        case Token.JSR:
        case Token.LABEL:
        case Token.LEAVEWITH:
        case Token.LET:
        case Token.LETEXPR:
        case Token.LOCAL_BLOCK:
        case Token.LOOP:
        case Token.NEW:
        case Token.REF_CALL:
        case Token.RETHROW:
        case Token.RETURN:
        case Token.RETURN_RESULT:
        case Token.SEMI:
        case Token.SETELEM:
        case Token.SETELEM_OP:
        case Token.SETNAME:
        case Token.SETPROP:
        case Token.SETPROP_OP:
        case Token.SETVAR:
        case Token.SET_REF:
        case Token.SET_REF_OP:
        case Token.SWITCH:
        case Token.TARGET:
        case Token.THROW:
        case Token.TRY:
        case Token.VAR:
        case Token.WHILE:
        case Token.WITH:
        case Token.WITHEXPR:
        case Token.YIELD:
          return true;

        default:
          return false;
      }
  }
 
开发者ID:tiffit,项目名称:TaleCraft,代码行数:77,代码来源:AstNode.java


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