Skip to content

Commit 6beda3d

Browse files
committed
Add some more SC-related bits to QAST::CompUnit.
1 parent 395aa0a commit 6beda3d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/QAST/CompUnit.nqp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ class QAST::CompUnit is QAST::Node {
22
# The serialization context for the compilation unit.
33
has $!sc;
44

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+
516
# The HLL name.
617
has $!hll;
718

@@ -15,4 +26,14 @@ class QAST::CompUnit is QAST::Node {
1526
method hll(*@value) { $!hll := @value[0] if @value; $!hll }
1627
method load(*@value) { $!load := @value[0] if @value; $!load }
1728
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+
}
1839
}

0 commit comments

Comments
 (0)