Class TokenLookup

java.lang.Object
com.oracle.js.parser.TokenLookup

public final class TokenLookup extends Object
Fast lookup of operators and keywords.
  • Method Details

    • lookupKeyword

      public static TokenType lookupKeyword(String content, int position, int length)
      Lookup keyword.
      Parameters:
      content - parse content char sequence
      position - index of position to start looking
      length - max length to scan
      Returns:
      token type for keyword
    • lookupOperator

      public static TokenType lookupOperator(char ch0, char ch1, char ch2, char ch3, int ecmaScriptVersion)
      Lookup operator.
      Parameters:
      ch0 - 0th char in stream
      ch1 - 1st char in stream
      ch2 - 2nd char in stream
      ch3 - 3rd char in stream
      Returns:
      the token type for the operator