Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add a QAST::CompUnit, which will be involved in SC handling and a few…
… other things we have one of per compilation unit.
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| class QAST::CompUnit is QAST::Node { | ||
| # The serialization context for the compilation unit. | ||
| has $!sc; | ||
|
|
||
| # The HLL name. | ||
| has $!hll; | ||
|
|
||
| # What to run at the point the compilation unit is loaded. | ||
| has $!load; | ||
|
|
||
| # What to run if this is the main entry point. | ||
| has $!main; | ||
|
|
||
| method sc(*@value) { $!sc := @value[0] if @value; $!sc } | ||
| method hll(*@value) { $!hll := @value[0] if @value; $!hll } | ||
| method load(*@value) { $!load := @value[0] if @value; $!load } | ||
| method main(*@value) { $!main := @value[0] if @value; $!main } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters