mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 04:37:47 +08:00
20b99c60b3
The name script is missleading as it only refering to the scripts (the files that contain the statements) where as it could also be the native module objects containing collection of native functions. After this commit, native functions can also have set owner module and it won't be as confusing as before.
40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2020-2022 Thakee Nathees
|
|
* Copyright (c) 2021-2022 Pocketlang Contributors
|
|
* Distributed Under The MIT License
|
|
*/
|
|
|
|
#ifndef COMMON_H
|
|
#define COMMON_H
|
|
|
|
#include <pocketlang.h>
|
|
|
|
#include <assert.h>
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
// Note that the cli itself is not a part of the pocketlang compiler, instead
|
|
// it's a host application to run pocketlang from the command line. We're
|
|
// embedding the pocketlang VM and we can only use its public APIs, not any
|
|
// internals of it, including assertion macros. So that we've copyied the
|
|
// "common.h" header. This can be moved to "src/include/common.h" and include
|
|
// as optional header, which is something I don't like because it makes
|
|
// pocketlang contain 2 headers (we'll always try to be minimal).
|
|
#include "common.h"
|
|
|
|
#define CLI_NOTICE \
|
|
"PocketLang " PK_VERSION_STRING " (https://github.com/ThakeeNathees/pocketlang/)\n" \
|
|
"Copyright (c) 2020 - 2021 ThakeeNathees\n" \
|
|
"Copyright (c) 2021-2022 Pocketlang Contributors\n" \
|
|
"Free and open source software under the terms of the MIT license.\n"
|
|
|
|
// FIXME: the vm user data of cli.
|
|
typedef struct {
|
|
bool repl_mode;
|
|
} VmUserData;
|
|
|
|
#endif // COMMON_H
|