This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: include feature.h
[perl5.git] / feature.h
CommitLineData
f2c01b15
FC
1/* -*- buffer-read-only: t -*-
2 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
3 This file is built by regen/feature.pl.
4 Any changes made here will be lost!
5 */
6
7
8#if defined(PERL_CORE) || defined (PERL_EXT)
9
10#define HINT_FEATURE_SHIFT 26
11
12#define FEATURE_BUNDLE_DEFAULT 0
13#define FEATURE_BUNDLE_510 1
14#define FEATURE_BUNDLE_511 2
15#define FEATURE_BUNDLE_515 3
2b9e0ab7 16#define FEATURE_BUNDLE_CUSTOM (HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT)
f2c01b15 17
d1fd0100
FC
18#define CURRENT_HINTS \
19 (PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
20#define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT)
21
03222170
FC
22#define FEATURE_SAY_IS_ENABLED \
23 ( \
24 (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \
25 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \
26 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
27 FEATURE_IS_ENABLED("say")) \
28 )
29
30#define FEATURE_STATE_IS_ENABLED \
31 ( \
32 (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \
33 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \
34 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
35 FEATURE_IS_ENABLED("state")) \
36 )
37
38#define FEATURE_SWITCH_IS_ENABLED \
39 ( \
40 (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \
41 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \
42 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
43 FEATURE_IS_ENABLED("switch")) \
44 )
45
46#define FEATURE_EVALBYTES_IS_ENABLED \
47 ( \
48 CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \
49 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
50 FEATURE_IS_ENABLED("evalbytes")) \
51 )
52
53#define FEATURE_ARYBASE_IS_ENABLED \
54 ( \
beda0318 55 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_511 \
03222170 56 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
3fff3427 57 FEATURE_IS_ENABLED("arybase")) \
03222170
FC
58 )
59
60#define FEATURE___SUB___IS_ENABLED \
61 ( \
62 CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \
63 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
64 FEATURE_IS_ENABLED("__SUB__")) \
65 )
66
67#define FEATURE_UNIEVAL_IS_ENABLED \
68 ( \
69 CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \
70 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
71 FEATURE_IS_ENABLED("unieval")) \
72 )
73
74#define FEATURE_UNICODE_IS_ENABLED \
75 ( \
76 (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_511 && \
77 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \
78 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
79 FEATURE_IS_ENABLED("unicode")) \
80 )
81
82
f2c01b15
FC
83#endif /* PERL_CORE or PERL_EXT */
84
85/* ex: set ro: */