Initial support for modules, partially implements #1

This commit is contained in:
2018-07-18 22:01:04 +02:00
parent 1929b3619a
commit ee5504ea3a
5 changed files with 124 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
#define __PH7INT_H__
#define PH7_PRIVATE
#include "ph7.h"
#include <dlfcn.h>
#ifndef PH7_PI
/* Value of PI */
#define PH7_PI 3.1415926535898
@@ -1273,6 +1274,7 @@ struct ph7_vm {
SyBlob sConsumer; /* Default VM consumer [i.e Redirect all VM output to this blob] */
SyBlob sWorker; /* General purpose working buffer */
SyBlob sArgv; /* $argv[] collector [refer to the [getopt()] implementation for more information] */
SySet aModules; /* Set of loaded modules */
SySet aFiles; /* Stack of processed files */
SySet aPaths; /* Set of import paths */
SySet aIncluded; /* Set of included files */