C# Class Lex.Util

Show file Open project: YourLocalFax/OLD-Score

Public Methods

Method Description
GetNumPrefixRadix ( char c ) : int

Returns the integer radix that a given character represents for numeric literals. Returns 0 if the character is not a valid number prefix.

GetTypeFromKeyword ( string s ) : TokenType

Returns the token type associated with the given keyword

IsBuiltinTyName ( string s ) : bool

Returns true if the image represents a primitive type name.

IsCombiningChar ( int c ) : bool

Returns true for unicode characters of classes Mn or Mc.

IsConnectingChar ( int c ) : bool

Returns true for unicode characters of class Pc.

IsDecimalDigitChar ( int c ) : bool

Returns true for unicode characters of class Nd.

IsDigit ( char c ) : bool

Returns true if the character is a valid decimal digit for numeric literals.

IsDigitInRadix ( char c, int radix ) : bool

Returns true if the character is a valid digit for numeric literals in the given radix.

IsFormattingChar ( int c ) : bool

Returns true for unicode characters of class Cf.

IsIdentifierPart ( int c ) : bool

Returns true if the unicode character is an identifier start or a combining, decimal digit, connecting, or formatting char.

IsIdentifierStart ( int c ) : bool

Returns true if the unicode character is a letter char or an underscore (U+005F).

IsKw ( string s ) : bool

Returns true if the given image is a keyword.

IsLetterChar ( int c ) : bool

Returns true for unicode characters of classes Lu, Ll, Lt, Lm, Lo, or Nl.

IsNumPrefix ( char c ) : bool

Returns true if the character is valid for a number prefix, false otherwise.

IsOperator ( char c ) : bool

Returns true if the character is a valid operator character.

TokenTypeToString ( TokenType type, string @default = null ) : string

Method Details

GetNumPrefixRadix() public static method

Returns the integer radix that a given character represents for numeric literals. Returns 0 if the character is not a valid number prefix.
public static GetNumPrefixRadix ( char c ) : int
c char
return int

GetTypeFromKeyword() public static method

Returns the token type associated with the given keyword
public static GetTypeFromKeyword ( string s ) : TokenType
s string
return TokenType

IsBuiltinTyName() public static method

Returns true if the image represents a primitive type name.
public static IsBuiltinTyName ( string s ) : bool
s string
return bool

IsCombiningChar() public static method

Returns true for unicode characters of classes Mn or Mc.
public static IsCombiningChar ( int c ) : bool
c int
return bool

IsConnectingChar() public static method

Returns true for unicode characters of class Pc.
public static IsConnectingChar ( int c ) : bool
c int
return bool

IsDecimalDigitChar() public static method

Returns true for unicode characters of class Nd.
public static IsDecimalDigitChar ( int c ) : bool
c int
return bool

IsDigit() public static method

Returns true if the character is a valid decimal digit for numeric literals.
public static IsDigit ( char c ) : bool
c char
return bool

IsDigitInRadix() public static method

Returns true if the character is a valid digit for numeric literals in the given radix.
public static IsDigitInRadix ( char c, int radix ) : bool
c char
radix int
return bool

IsFormattingChar() public static method

Returns true for unicode characters of class Cf.
public static IsFormattingChar ( int c ) : bool
c int
return bool

IsIdentifierPart() public static method

Returns true if the unicode character is an identifier start or a combining, decimal digit, connecting, or formatting char.
public static IsIdentifierPart ( int c ) : bool
c int
return bool

IsIdentifierStart() public static method

Returns true if the unicode character is a letter char or an underscore (U+005F).
public static IsIdentifierStart ( int c ) : bool
c int
return bool

IsKw() public static method

Returns true if the given image is a keyword.
public static IsKw ( string s ) : bool
s string
return bool

IsLetterChar() public static method

Returns true for unicode characters of classes Lu, Ll, Lt, Lm, Lo, or Nl.
public static IsLetterChar ( int c ) : bool
c int
return bool

IsNumPrefix() public static method

Returns true if the character is valid for a number prefix, false otherwise.
public static IsNumPrefix ( char c ) : bool
c char
return bool

IsOperator() public static method

Returns true if the character is a valid operator character.
public static IsOperator ( char c ) : bool
c char
return bool

TokenTypeToString() public static method

public static TokenTypeToString ( TokenType type, string @default = null ) : string
type TokenType
@default string
return string