aboutsummaryrefslogtreecommitdiff
path: root/examples/preprocessor.halk
blob: 9e3f6b52338963efe75e5780694568ffcabd3c60 (plain) (blame)
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
`
   #def# #ID# [#VALUE#]    set a macro
   #fed# #ID#              unset a macro

   #cde# #VALUE#           leave code as is

   #ddo# #ID?# #DIR#       if defined, do #DIR# (Defined DO)
   #udo# #ID?# #DIR#       if undefined, do #DIR# (UnDefined Do)

   #inc# #FPATH#           include a file

   #ID#                    call a macro
`

` example usage: `

#def# #VERSION# #"31.4.1"#

#ddo# #BSD# #inc# #bsd_support.halk#

#udo# #OS# #
   some_error_func."os not specified";
#

#def# #OSTYPE# #
   os/shell."sysctl kernel.ostype"
#

stdio/pln.#OSTYPE#