Class Token

java.lang.Object
com.google.javascript.rhino.Token

public class Token extends Object
This class implements the JavaScript scanner. It is based on the C source files jsscan.c and jsscan.h in the jsref package.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
     
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
     
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
     
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
     
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
    static final int
    Token types.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    name(int token)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ERROR

      public static final int ERROR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • RETURN

      public static final int RETURN
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • BITOR

      public static final int BITOR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • BITXOR

      public static final int BITXOR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • BITAND

      public static final int BITAND
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • EQ

      public static final int EQ
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • NE

      public static final int NE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • LT

      public static final int LT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • LE

      public static final int LE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • GT

      public static final int GT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • GE

      public static final int GE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • LSH

      public static final int LSH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • RSH

      public static final int RSH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • URSH

      public static final int URSH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ADD

      public static final int ADD
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • SUB

      public static final int SUB
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • MUL

      public static final int MUL
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • DIV

      public static final int DIV
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • MOD

      public static final int MOD
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • NOT

      public static final int NOT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • BITNOT

      public static final int BITNOT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • POS

      public static final int POS
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • NEG

      public static final int NEG
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • NEW

      public static final int NEW
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • DELPROP

      public static final int DELPROP
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • TYPEOF

      public static final int TYPEOF
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • GETPROP

      public static final int GETPROP
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • GETELEM

      public static final int GETELEM
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • CALL

      public static final int CALL
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • NAME

      public static final int NAME
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • NUMBER

      public static final int NUMBER
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • STRING

      public static final int STRING
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • NULL

      public static final int NULL
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • THIS

      public static final int THIS
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • FALSE

      public static final int FALSE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • TRUE

      public static final int TRUE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • SHEQ

      public static final int SHEQ
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • SHNE

      public static final int SHNE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • REGEXP

      public static final int REGEXP
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • THROW

      public static final int THROW
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • IN

      public static final int IN
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • INSTANCEOF

      public static final int INSTANCEOF
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ARRAYLIT

      public static final int ARRAYLIT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • OBJECTLIT

      public static final int OBJECTLIT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • TRY

      public static final int TRY
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • PARAM_LIST

      public static final int PARAM_LIST
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • COMMA

      public static final int COMMA
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN

      public static final int ASSIGN
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_BITOR

      public static final int ASSIGN_BITOR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_BITXOR

      public static final int ASSIGN_BITXOR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_BITAND

      public static final int ASSIGN_BITAND
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_LSH

      public static final int ASSIGN_LSH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_RSH

      public static final int ASSIGN_RSH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_URSH

      public static final int ASSIGN_URSH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_ADD

      public static final int ASSIGN_ADD
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_SUB

      public static final int ASSIGN_SUB
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_MUL

      public static final int ASSIGN_MUL
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_DIV

      public static final int ASSIGN_DIV
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ASSIGN_MOD

      public static final int ASSIGN_MOD
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • HOOK

      public static final int HOOK
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • OR

      public static final int OR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • AND

      public static final int AND
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • INC

      public static final int INC
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • DEC

      public static final int DEC
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • FUNCTION

      public static final int FUNCTION
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • IF

      public static final int IF
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • SWITCH

      public static final int SWITCH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • CASE

      public static final int CASE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • DEFAULT_CASE

      public static final int DEFAULT_CASE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • WHILE

      public static final int WHILE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • DO

      public static final int DO
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • FOR

      public static final int FOR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • BREAK

      public static final int BREAK
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • CONTINUE

      public static final int CONTINUE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • VAR

      public static final int VAR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • WITH

      public static final int WITH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • CATCH

      public static final int CATCH
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • VOID

      public static final int VOID
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • EMPTY

      public static final int EMPTY
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • BLOCK

      public static final int BLOCK
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • LABEL

      public static final int LABEL
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • EXPR_RESULT

      public static final int EXPR_RESULT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • SCRIPT

      public static final int SCRIPT
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • GETTER_DEF

      public static final int GETTER_DEF
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • SETTER_DEF

      public static final int SETTER_DEF
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • CONST

      public static final int CONST
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • DEBUGGER

      public static final int DEBUGGER
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • LABEL_NAME

      public static final int LABEL_NAME
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • STRING_KEY

      public static final int STRING_KEY
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • CAST

      public static final int CAST
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ANNOTATION

      public static final int ANNOTATION
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • PIPE

      public static final int PIPE
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • STAR

      public static final int STAR
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • EOC

      public static final int EOC
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • QMARK

      public static final int QMARK
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • ELLIPSIS

      public static final int ELLIPSIS
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • BANG

      public static final int BANG
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • EQUALS

      public static final int EQUALS
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • LB

      public static final int LB
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • LC

      public static final int LC
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • COLON

      public static final int COLON
      Token types. These values correspond to JSTokenType values in jsscan.c.
      See Also:
    • DEFAULT

      public static final int DEFAULT
      See Also:
    • GET

      public static final int GET
      See Also:
    • LP

      public static final int LP
      See Also:
    • SET

      public static final int SET
      See Also:
  • Constructor Details

    • Token

      public Token()
  • Method Details

    • name

      public static String name(int token)