aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/patch-header.janet
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patch-header.janet')
-rw-r--r--tools/patch-header.janet11
1 files changed, 1 insertions, 10 deletions
diff --git a/tools/patch-header.janet b/tools/patch-header.janet
index bbc86653..af44aba0 100644
--- a/tools/patch-header.janet
+++ b/tools/patch-header.janet
@@ -1,12 +1,3 @@
# Patch janet.h
-
(def [_ janeth janetconf output] (dyn :args))
-
-(def- replace-peg
- (peg/compile
- ~(% (* '(to `#include "janetconf.h"`)
- (constant ,(slurp janetconf))
- (thru `#include "janetconf.h"`)
- '(any 1)))))
-
-(spit output (first (peg/match replace-peg (slurp janeth))))
+(spit output (peg/replace `#include "janetconf.h"` (slurp janetconf) (slurp janeth)))