-
-
Save nilium/97862bbdf561e31d49e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef object_t* TNode; | |
class_t TNodeClass = { | |
NULL, | |
"TNode", | |
0, | |
NULL, NULL, | |
0, | |
NULL, | |
0, | |
NULL | |
}; // TNodeClass | |
void __TNodeClass_init() { | |
} | |
typedef object_t* TLiteral; | |
class_t TLiteralClass = { | |
NULL, | |
"TLiteral", | |
0, | |
NULL, NULL, | |
0, | |
NULL, | |
0, | |
NULL | |
}; // TLiteralClass | |
void __TLiteralClass_init() { | |
} | |
typedef object_t* TDecl; | |
char* TDecl_GetName(TDecl Self); | |
class_t TDeclClass = { | |
&TNodeClass, | |
"TDecl", | |
0, | |
NULL, NULL, | |
1, | |
NULL, | |
0, | |
NULL | |
}; // TDeclClass | |
void __TDeclClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TDeclClass.num_methods); | |
methods[0].name = "GetName"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TDecl_GetName; | |
__TNodeClass_init(); | |
} | |
typedef object_t* TVariable; | |
char* TVariable_GetName(TVariable Self); | |
char* TVariable_Decl(TVariable Self); | |
class_t TVariableClass = { | |
&TDeclClass, | |
"TVariable", | |
0, | |
NULL, NULL, | |
2, | |
NULL, | |
0, | |
NULL | |
}; // TVariableClass | |
void __TVariableClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TVariableClass.num_methods); | |
methods[0].name = "GetName"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TVariable_GetName; | |
methods[1].name = "Decl"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TVariable_Decl; | |
__TDeclClass_init(); | |
} | |
typedef object_t* TType; | |
char* TType_ToString(TType Self); | |
TTypeDecl TType_GetTypeDecl(TType Self); | |
char* TType_GetName(TType Self); | |
class_t TTypeClass = { | |
&TDeclClass, | |
"TType", | |
0, | |
NULL, NULL, | |
3, | |
NULL, | |
0, | |
NULL | |
}; // TTypeClass | |
void __TTypeClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TTypeClass.num_methods); | |
methods[0].name = "ToString"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TType_ToString; | |
methods[1].name = "GetTypeDecl"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TType_GetTypeDecl; | |
methods[2].name = "GetName"; | |
methods[2].signature = ""; | |
methods[2].method = (method_t)TType_GetName; | |
__TDeclClass_init(); | |
} | |
typedef object_t* TArrayType; | |
void TArrayType_New(TArrayType Self); | |
char* TArrayType_ToString(TArrayType Self); | |
char* TArrayType_GetName(TArrayType Self); | |
class_t TArrayTypeClass = { | |
&TTypeClass, | |
"TArrayType", | |
0, | |
TArrayType_New, | |
NULL, | |
2, | |
NULL, | |
0, | |
NULL | |
}; // TArrayTypeClass | |
void __TArrayTypeClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TArrayTypeClass.num_methods); | |
methods[0].name = "ToString"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TArrayType_ToString; | |
methods[1].name = "GetName"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TArrayType_GetName; | |
__TTypeClass_init(); | |
} | |
typedef object_t* TPointerType; | |
char* TPointerType_ToString(TPointerType Self); | |
void TPointerType_New(TPointerType Self); | |
char* TPointerType_GetName(TPointerType Self); | |
class_t TPointerTypeClass = { | |
&TTypeClass, | |
"TPointerType", | |
0, | |
TPointerType_New, | |
NULL, | |
2, | |
NULL, | |
0, | |
NULL | |
}; // TPointerTypeClass | |
void __TPointerTypeClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TPointerTypeClass.num_methods); | |
methods[0].name = "ToString"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TPointerType_ToString; | |
methods[1].name = "GetName"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TPointerType_GetName; | |
__TTypeClass_init(); | |
} | |
typedef object_t* TRefType; | |
char* TRefType_ToString(TRefType Self); | |
void TRefType_New(TRefType Self); | |
char* TRefType_GetName(TRefType Self); | |
class_t TRefTypeClass = { | |
&TTypeClass, | |
"TRefType", | |
0, | |
TRefType_New, | |
NULL, | |
2, | |
NULL, | |
0, | |
NULL | |
}; // TRefTypeClass | |
void __TRefTypeClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TRefTypeClass.num_methods); | |
methods[0].name = "ToString"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TRefType_ToString; | |
methods[1].name = "GetName"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TRefType_GetName; | |
__TTypeClass_init(); | |
} | |
typedef object_t* TBlock; | |
class_t TBlockClass = { | |
&TNodeClass, | |
"TBlock", | |
0, | |
NULL, NULL, | |
0, | |
NULL, | |
0, | |
NULL | |
}; // TBlockClass | |
void __TBlockClass_init() { | |
__TNodeClass_init(); | |
} | |
typedef object_t* TModule; | |
class_t TModuleClass = { | |
&TBlockClass, | |
"TModule", | |
0, | |
NULL, NULL, | |
0, | |
NULL, | |
0, | |
NULL | |
}; // TModuleClass | |
void __TModuleClass_init() { | |
__TBlockClass_init(); | |
} | |
typedef object_t* TTypeDecl; | |
TType TTypeDecl_GetType(TTypeDecl Self); | |
char* TTypeDecl_GetName(TTypeDecl Self); | |
char* TTypeDecl_Decl(TTypeDecl Self); | |
class_t TTypeDeclClass = { | |
&TDeclClass, | |
"TTypeDecl", | |
0, | |
NULL, NULL, | |
3, | |
NULL, | |
0, | |
NULL | |
}; // TTypeDeclClass | |
void __TTypeDeclClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TTypeDeclClass.num_methods); | |
methods[0].name = "GetType"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TTypeDecl_GetType; | |
methods[1].name = "GetName"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TTypeDecl_GetName; | |
methods[2].name = "Decl"; | |
methods[2].signature = ""; | |
methods[2].method = (method_t)TTypeDecl_Decl; | |
__TDeclClass_init(); | |
} | |
typedef object_t* TFunction; | |
char* TFunction_GetName(TFunction Self); | |
char* TFunction_GetMangledName(TFunction Self); | |
char* TFunction_Decl(TFunction Self); | |
class_t TFunctionClass = { | |
&TDeclClass, | |
"TFunction", | |
0, | |
NULL, NULL, | |
3, | |
NULL, | |
0, | |
NULL | |
}; // TFunctionClass | |
void __TFunctionClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TFunctionClass.num_methods); | |
methods[0].name = "GetName"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TFunction_GetName; | |
methods[1].name = "GetMangledName"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TFunction_GetMangledName; | |
methods[2].name = "Decl"; | |
methods[2].signature = ""; | |
methods[2].method = (method_t)TFunction_Decl; | |
__TDeclClass_init(); | |
} | |
typedef object_t* TTokenStream; | |
int TTokenStream_HasNext(TTokenStream Self); | |
TToken TTokenStream_Read(TTokenStream Self); | |
void TTokenStream_Skip(TTokenStream Self); | |
TToken TTokenStream_Current(TTokenStream Self); | |
TToken TTokenStream_Peek(TTokenStream Self); | |
int TTokenStream_Mark(TTokenStream Self); | |
void TTokenStream_Reset(TTokenStream Self); | |
char* TTokenStream_PositionString(TTokenStream Self); | |
class_t TTokenStreamClass = { | |
NULL, | |
"TTokenStream", | |
0, | |
NULL, NULL, | |
8, | |
NULL, | |
0, | |
NULL | |
}; // TTokenStreamClass | |
void __TTokenStreamClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TTokenStreamClass.num_methods); | |
methods[0].name = "HasNext"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TTokenStream_HasNext; | |
methods[1].name = "Read"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TTokenStream_Read; | |
methods[2].name = "Skip"; | |
methods[2].signature = ""; | |
methods[2].method = (method_t)TTokenStream_Skip; | |
methods[3].name = "Current"; | |
methods[3].signature = ""; | |
methods[3].method = (method_t)TTokenStream_Current; | |
methods[4].name = "Peek"; | |
methods[4].signature = ""; | |
methods[4].method = (method_t)TTokenStream_Peek; | |
methods[5].name = "Mark"; | |
methods[5].signature = ""; | |
methods[5].method = (method_t)TTokenStream_Mark; | |
methods[6].name = "Reset"; | |
methods[6].signature = ""; | |
methods[6].method = (method_t)TTokenStream_Reset; | |
methods[7].name = "PositionString"; | |
methods[7].signature = ""; | |
methods[7].method = (method_t)TTokenStream_PositionString; | |
} | |
typedef object_t* TParser; | |
void TParser_ParseSource(TParser Self); | |
TType TParser_ReadType(TParser Self); | |
void TParser_ReadTypeDecl(TParser Self); | |
void TParser_EndTypeDecl(TParser Self); | |
void TParser_ReadMethodDecl(TParser Self); | |
void TParser_EndMethodDecl(TParser Self); | |
void TParser_ReadParameters(TParser Self); | |
void TParser_ReadMetadata(TParser Self); | |
class_t TParserClass = { | |
NULL, | |
"TParser", | |
0, | |
NULL, NULL, | |
8, | |
NULL, | |
0, | |
NULL | |
}; // TParserClass | |
void __TParserClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TParserClass.num_methods); | |
methods[0].name = "ParseSource"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TParser_ParseSource; | |
methods[1].name = "ReadType"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TParser_ReadType; | |
methods[2].name = "ReadTypeDecl"; | |
methods[2].signature = ""; | |
methods[2].method = (method_t)TParser_ReadTypeDecl; | |
methods[3].name = "EndTypeDecl"; | |
methods[3].signature = ""; | |
methods[3].method = (method_t)TParser_EndTypeDecl; | |
methods[4].name = "ReadMethodDecl"; | |
methods[4].signature = ""; | |
methods[4].method = (method_t)TParser_ReadMethodDecl; | |
methods[5].name = "EndMethodDecl"; | |
methods[5].signature = ""; | |
methods[5].method = (method_t)TParser_EndMethodDecl; | |
methods[6].name = "ReadParameters"; | |
methods[6].signature = ""; | |
methods[6].method = (method_t)TParser_ReadParameters; | |
methods[7].name = "ReadMetadata"; | |
methods[7].signature = ""; | |
methods[7].method = (method_t)TParser_ReadMetadata; | |
} | |
typedef object_t* TExporter; | |
void TExporter_Export(TExporter Self); | |
void TExporter_ExportTypeDecl(TExporter Self); | |
void TExporter_ExportTypeClass(TExporter Self); | |
class_t TExporterClass = { | |
NULL, | |
"TExporter", | |
0, | |
NULL, NULL, | |
3, | |
NULL, | |
0, | |
NULL | |
}; // TExporterClass | |
void __TExporterClass_init() { | |
method_info_t* methods = (method_info_t*)malloc(sizeof(method_info_t)*TExporterClass.num_methods); | |
methods[0].name = "Export"; | |
methods[0].signature = ""; | |
methods[0].method = (method_t)TExporter_Export; | |
methods[1].name = "ExportTypeDecl"; | |
methods[1].signature = ""; | |
methods[1].method = (method_t)TExporter_ExportTypeDecl; | |
methods[2].name = "ExportTypeClass"; | |
methods[2].signature = ""; | |
methods[2].method = (method_t)TExporter_ExportTypeClass; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment