- Added support for n-ary pointer types in function parameters
- Added a test case for the above
- Updated current pointer test to test function type n-ary as well (return type)
loops
parent 5827f16e2a
commit 7224829fcb

@ -883,7 +883,7 @@ public final class Parser
nextToken();
/* If it is a star `*` */
if(getSymbolType(getCurrentToken()) == SymbolType.STAR)
while(getSymbolType(getCurrentToken()) == SymbolType.STAR)
{
// Make type a pointer
type = type~"*";
@ -2212,6 +2212,16 @@ module simple_pointer;
int j;
void myFunc(int* ptr, int** ptrPtr, int*** ptrPtrPtr)
{
}
int** funcPtr()
{
return 1;
}
int function(int* ptr)
{
*ptr = 2+2;

Loading…
Cancel
Save