Moved `isCharacterNumber` to utils.d
This commit is contained in:
parent
9c72756336
commit
25bfdfc24e
|
@ -69,14 +69,6 @@ public bool isType(string tokenStr)
|
|||
"long") == 0 || cmp(tokenStr, "ulong") == 0 || cmp(tokenStr, "void") == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given character is a number
|
||||
*/
|
||||
private bool isCharacterNumber(char character)
|
||||
{
|
||||
return (character >= 48 && character <= 57);
|
||||
}
|
||||
|
||||
private bool isIdentifier(string token)
|
||||
{
|
||||
/* This is used to prevent the first character from not being number */
|
||||
|
|
|
@ -21,4 +21,12 @@ public bool isPresent(string[] arr, string t)
|
|||
public bool isCharacterAlpha(char character)
|
||||
{
|
||||
return (character >= 65 && character <= 90) || (character >= 97 && character <= 122);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given character is a number
|
||||
*/
|
||||
public bool isCharacterNumber(char character)
|
||||
{
|
||||
return (character >= 48 && character <= 57);
|
||||
}
|
Loading…
Reference in New Issue