C# Class 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.
Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Méthodes publiques

Méthode Description
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".

Method Details

IsValidToken() public static méthode

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
Résultat bool

KeywordToName() public static méthode

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
Résultat string

Name() public static méthode

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
Résultat string

TypeToName() public static méthode

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
Résultat string