forked from KolibriOS/kolibrios
Added new port TinyBasic
(An improved version in conjunction with ktcc can generate executable files.) git-svn-id: svn://kolibrios.org@8733 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
50
programs/develop/tinybasic-1.0.4/inc/generatec.h
Normal file
50
programs/develop/tinybasic-1.0.4/inc/generatec.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Tiny BASIC Interpreter and Compiler Project
|
||||
* C Output Header
|
||||
*
|
||||
* Copyright (C) Damian Gareth Walker 2019
|
||||
* Created: 03-Oct-2019
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GENERATEC_H__
|
||||
#define __GENERATEC_H__
|
||||
|
||||
|
||||
/* included headers */
|
||||
#include "errors.h"
|
||||
#include "options.h"
|
||||
|
||||
/* forward references */
|
||||
typedef struct c_program CProgram;
|
||||
|
||||
/* object structure */
|
||||
typedef struct c_program {
|
||||
void *private_data; /* private data */
|
||||
char *c_output; /* the generated C code */
|
||||
void (*generate) (CProgram *, ProgramNode *); /* generate function */
|
||||
void (*destroy) (CProgram *); /* destructor */
|
||||
} CProgram;
|
||||
|
||||
|
||||
/*
|
||||
* Function Declarations
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Constructor
|
||||
* params:
|
||||
* ErrorHandler* compiler_errors the error handler
|
||||
* LanguageOptions* compiler_options language options
|
||||
* changes:
|
||||
* CProgram* this the object being created
|
||||
* Private* data the object's private data
|
||||
* returns:
|
||||
* CProgram* the created object
|
||||
*/
|
||||
CProgram *new_CProgram (ErrorHandler *compiler_errors,
|
||||
LanguageOptions *compiler_options);
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user