Enum Class Keywords

java.lang.Object
java.lang.Enum<Keywords>
com.google.javascript.jscomp.parsing.parser.Keywords
All Implemented Interfaces:
Serializable, Comparable<Keywords>, Constable

public enum Keywords extends Enum<Keywords>
The JavaScript keywords.
  • Enum Constant Details

    • BREAK

      public static final Keywords BREAK
    • CASE

      public static final Keywords CASE
    • CATCH

      public static final Keywords CATCH
    • CONTINUE

      public static final Keywords CONTINUE
    • DEBUGGER

      public static final Keywords DEBUGGER
    • DEFAULT

      public static final Keywords DEFAULT
    • DELETE

      public static final Keywords DELETE
    • DO

      public static final Keywords DO
    • ELSE

      public static final Keywords ELSE
    • FINALLY

      public static final Keywords FINALLY
    • FOR

      public static final Keywords FOR
    • FUNCTION

      public static final Keywords FUNCTION
    • IF

      public static final Keywords IF
    • IN

      public static final Keywords IN
    • INSTANCEOF

      public static final Keywords INSTANCEOF
    • NEW

      public static final Keywords NEW
    • RETURN

      public static final Keywords RETURN
    • SWITCH

      public static final Keywords SWITCH
    • THIS

      public static final Keywords THIS
    • THROW

      public static final Keywords THROW
    • TRY

      public static final Keywords TRY
    • TYPEOF

      public static final Keywords TYPEOF
    • VAR

      public static final Keywords VAR
    • VOID

      public static final Keywords VOID
    • WHILE

      public static final Keywords WHILE
    • WITH

      public static final Keywords WITH
    • CLASS

      public static final Keywords CLASS
    • CONST

      public static final Keywords CONST
    • ENUM

      public static final Keywords ENUM
    • EXPORT

      public static final Keywords EXPORT
    • EXTENDS

      public static final Keywords EXTENDS
    • IMPORT

      public static final Keywords IMPORT
    • SUPER

      public static final Keywords SUPER
    • IMPLEMENTS

      public static final Keywords IMPLEMENTS
    • INTERFACE

      public static final Keywords INTERFACE
    • LET

      public static final Keywords LET
    • PACKAGE

      public static final Keywords PACKAGE
    • PRIVATE

      public static final Keywords PRIVATE
    • PROTECTED

      public static final Keywords PROTECTED
    • PUBLIC

      public static final Keywords PUBLIC
    • STATIC

      public static final Keywords STATIC
    • YIELD

      public static final Keywords YIELD
    • NULL

      public static final Keywords NULL
    • TRUE

      public static final Keywords TRUE
    • FALSE

      public static final Keywords FALSE
  • Field Details

  • Method Details

    • values

      public static Keywords[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Keywords valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Keywords>
    • isKeyword

      public static boolean isKeyword(String value)
    • isKeyword

      public static boolean isKeyword(TokenType token)
    • isStrictKeyword

      public static boolean isStrictKeyword(TokenType token)
      Returns true if token is a "future reserved word" which can be used as a variable identifier, but only in non-strict mode.
    • getTokenType

      public static TokenType getTokenType(String value)
    • get

      public static Keywords get(String value)
    • get

      public static Keywords get(TokenType token)