]> gitweb.factorcode.org Git - factor.git/blobdiff - core/syntax/syntax.factor
syntax: adding STARTUP-HOOK: and SHUTDOWN-HOOK:
[factor.git] / core / syntax / syntax.factor
index 31001ea19cc81ec9fb791ba075cf1b08fe53f070..bd455574483709c6a7906b5029796bde49466d1f 100644 (file)
@@ -334,4 +334,14 @@ IN: bootstrap.syntax
     "MACRO::" [ (::) define-macro ] define-core-syntax
     "MEMO::" [ (::) define-memoized ] define-core-syntax
     "IDENTITY-MEMO::" [ (::) define-identity-memoized ] define-core-syntax
+
+    "STARTUP-HOOK:" [
+        \ ; parse-until >quotation current-vocab name>>
+        add-startup-hook
+    ] define-core-syntax
+
+    "SHUTDOWN-HOOK:" [
+        \ ; parse-until >quotation current-vocab name>>
+        add-shutdown-hook
+    ] define-core-syntax
 ] with-compilation-unit