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:
turbocat
2021-05-23 15:55:49 +00:00
parent 4a09257a8f
commit 43795ab11a
34 changed files with 7387 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
/*
* Tiny BASIC Interpreter and Compiler Project
* Interpreter header
*
* Released as Public Domain by Damian Gareth Walker 2019
* Created: 23-Aug-2019
*/
#ifndef __INTERPRET_H__
#define __INTERPRET_H__
/* included headers */
#include "errors.h"
#include "options.h"
#include "statement.h"
/*
* Data Declarations
*/
/* the interpreter object */
typedef struct interpreter_data InterpreterData;
typedef struct interpreter Interpreter;
typedef struct interpreter {
/* Properties */
InterpreterData *priv; /* private data */
/*
* Interpret the program
* params:
* Interpreter* the interpreter to use
* ProgramNode* the program to interpret
*/
void (*interpret) (Interpreter *, ProgramNode *);
/*
* Destructor
* params:
* Interpreter* the doomed interpreter
*/
void (*destroy) (Interpreter *);
} Interpreter;
/*
* Function Declarations
*/
/*
* Constructor
* returns:
* Interpreter* the new interpreter
*/
Interpreter *new_Interpreter (ErrorHandler *errors, LanguageOptions *options);
#endif