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:
64
programs/develop/tinybasic-1.0.4/inc/interpret.h
Normal file
64
programs/develop/tinybasic-1.0.4/inc/interpret.h
Normal 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
|
Reference in New Issue
Block a user