Moved `isCharacterNumber` to utils.d

This commit is contained in:
Tristan B. Velloza Kildaire 2021-03-28 19:49:37 +02:00
parent 9c72756336
commit 25bfdfc24e
2 changed files with 8 additions and 8 deletions

View File

@ -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 */

View File

@ -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);
}