File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,17 @@ class QAST::CompUnit is QAST::Node {
2
2
# The serialization context for the compilation unit.
3
3
has $ ! sc ;
4
4
5
+ # Are we in compilation mode?
6
+ has int $ ! compilation_mode ;
7
+
8
+ # Tasks we should run prior to deserialization (or, in the non-precompiled
9
+ # case, just before everything else in this compilation unit).
10
+ has @ ! pre_deserialize ;
11
+
12
+ # Taks we should run after deserialization (or, in the non-precompiled
13
+ # csae, right after the pre-deserialize tasks).
14
+ has @ ! post_deserialize ;
15
+
5
16
# The HLL name.
6
17
has $ ! hll ;
7
18
@@ -15,4 +26,14 @@ class QAST::CompUnit is QAST::Node {
15
26
method hll (* @ value ) { $ ! hll := @ value [0 ] if @ value ; $ ! hll }
16
27
method load (* @ value ) { $ ! load := @ value [0 ] if @ value ; $ ! load }
17
28
method main (* @ value ) { $ ! main := @ value [0 ] if @ value ; $ ! main }
29
+
30
+ method compilation_mode (* @ value ) {
31
+ $ ! compilation_mode := @ value [0 ] if @ value ; $ ! compilation_mode
32
+ }
33
+ method pre_deserialize (* @ value ) {
34
+ @ ! pre_deserialize := @ value [0 ] if @ value ; @ ! pre_deserialize
35
+ }
36
+ method post_deserialize (* @ value ) {
37
+ @ ! post_deserialize := @ value [0 ] if @ value ; @ ! post_deserialize
38
+ }
18
39
}
You can’t perform that action at this time.
0 commit comments