MetaProcessor

- Implemented `isSystemType(string)` which returns `true` if the provided type is a system type alias (such as `size_t` or `ssize_t`), `false` otherwise
This commit is contained in:
Tristan B. Velloza Kildaire 2023-05-29 11:57:20 +02:00
parent dc78da4dd5
commit 8ed0f8fba4
1 changed files with 21 additions and 0 deletions

View File

@ -263,6 +263,27 @@ public class MetaProcessor
return literal;
}
/**
* Determines if the given type is a system type alias
*
* Params:
* typeAlias = the type to check
* Returns: `true` if system type alias, `false` otherwise
*/
private bool isSystemType(string typeAlias)
{
/* `size_t`/`ssize_t` system type aliases */
if(typeAlias == "size_t" || typeAlias == "ssize_t")
{
return true;
}
/* Else, not a system type alias */
else
{
return false;
}
}
/**
* Given a type alias (think `size_t`/`ssize_t` for example) this will