-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathspecials.lisp
36 lines (29 loc) · 1.11 KB
/
specials.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(defpackage #:vernacular/specials
(:documentation "Special variables used throughout.")
(:use #:cl #:overlord/types)
(:import-from #:serapeum #:defvar-unbound #:absolute-pathname)
(:import-from #:overlord/specials #:register-worker-special)
(:export
#:*input*
#:*output*
#:*module*
#:*program*
#:*program-preamble*
#:*language*
#:*source*
#:*default-lang*))
(in-package #:vernacular/specials)
(defvar-unbound *source* "Source file being compiled.")
(declaim (type absolute-pathname *source*))
(defvar-unbound *module* "The module being returned.")
(defvar-unbound *program* "The program to be compiled.")
(defvar-unbound *program-preamble*
"A preamble to the program to be compiled.
This would be something like a package declaration, that the reader
has to see before the other forms.")
(defvar-unbound *language* "The name (symbol) of the current language.")
(declaim (type symbol *language*))
(defvar *default-lang* nil
"The name (symbol) of the language to use if the module file does not specify a language.")
(declaim (type symbol *default-lang*))
(register-worker-special '*default-lang*)