C# Класс Rhino.Token

This class implements the JavaScript scanner.
This class implements the JavaScript scanner. It is based on the C source files jsscan.c and jsscan.h in the jsref package.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
IsValidToken ( int code ) : bool

Return true if the passed code is a valid Token constant.

Return true if the passed code is a valid Token constant.

KeywordToName ( int token ) : string

Convert a keyword token to a name string for use with the Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER feature.

Name ( int token ) : string

Returns a name for the token.

Returns a name for the token. If Rhino is compiled with certain hardcoded debugging flags in this file, it calls #typeToName ; otherwise it returns a string whose value is the token number.

TypeToName ( int token ) : string

Always returns a human-readable string for the token name.

Always returns a human-readable string for the token name. For instance, FINALLY has the name "FINALLY".

Описание методов

IsValidToken() публичный статический Метод

Return true if the passed code is a valid Token constant.
Return true if the passed code is a valid Token constant.
public static IsValidToken ( int code ) : bool
code int a potential token code
Результат bool

KeywordToName() публичный статический Метод

Convert a keyword token to a name string for use with the Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER feature.
public static KeywordToName ( int token ) : string
token int A token
Результат string

Name() публичный статический Метод

Returns a name for the token.
Returns a name for the token. If Rhino is compiled with certain hardcoded debugging flags in this file, it calls #typeToName ; otherwise it returns a string whose value is the token number.
public static Name ( int token ) : string
token int
Результат string

TypeToName() публичный статический Метод

Always returns a human-readable string for the token name.
Always returns a human-readable string for the token name. For instance, FINALLY has the name "FINALLY".
public static TypeToName ( int token ) : string
token int the token code
Результат string