1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-08 03:23:01 +00:00

Allow enabling/disabling of peg module.

Use compiler define -DJANET_NO_PEG to turn off the peg module.
This commit is contained in:
Calvin Rose
2019-02-17 21:22:03 -05:00
parent 54227ebff1
commit 1e70c97ef0
4 changed files with 12 additions and 1 deletions

View File

@@ -20,6 +20,8 @@
* IN THE SOFTWARE.
*/
#ifdef JANET_PEG
#ifndef JANET_AMALG
#include <janet/janet.h>
#include <string.h>
@@ -1105,3 +1107,5 @@ static const JanetReg peg_cfuns[] = {
void janet_lib_peg(JanetTable *env) {
janet_core_cfuns(env, NULL, peg_cfuns);
}
#endif /* ifdef JANET_PEG */