52 lines
746 B
C
52 lines
746 B
C
|
|
#ifndef _function
|
||
|
|
|
||
|
|
#define _function
|
||
|
|
|
||
|
|
#include "method.h"
|
||
|
|
|
||
|
|
#include "array.h"
|
||
|
|
|
||
|
|
#include "text.h"
|
||
|
|
|
||
|
|
#include "string.h"
|
||
|
|
|
||
|
|
#include "index.h"
|
||
|
|
|
||
|
|
|
||
|
|
struct functionLayout{
|
||
|
|
|
||
|
|
char * name;
|
||
|
|
|
||
|
|
|
||
|
|
char * body;
|
||
|
|
|
||
|
|
char * bodyOriginal;
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
int lineNumber;
|
||
|
|
|
||
|
|
int isVariadic;
|
||
|
|
|
||
|
|
|
||
|
|
struct array * declaration;
|
||
|
|
|
||
|
|
struct array * arguments;
|
||
|
|
|
||
|
|
struct array * variables;
|
||
|
|
|
||
|
|
|
||
|
|
char * declarationText;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
struct functionLayout * function_getFunctionByName( struct array * functions, char * functionName );
|
||
|
|
|
||
|
|
char * function_getReturnTypeBySymbol( char * functionName, int * leftSideIsPointer );
|
||
|
|
|
||
|
|
int functionExists( struct array * functions, char * functionName );
|
||
|
|
|
||
|
|
void cloneMethodToFunction( struct method * currentMethod, struct array * functions, char * newName );
|
||
|
|
|
||
|
|
#endif
|