Skip to content

Commit

Permalink
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
jnthn committed Jun 25, 2012
1 parent 20a37a9 commit 702c1b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/QAST/CompUnit.nqp
@@ -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 }
}
1 change: 1 addition & 0 deletions tools/build/Makefile.in
Expand Up @@ -83,6 +83,7 @@ QAST_SOURCES = \
src/QAST/Stmts.nqp \
src/QAST/Stmt.nqp \
src/QAST/Block.nqp \
src/QAST/CompUnit.nqp \
src/QAST/Operations.nqp \
src/QAST/Compiler.nqp \

Expand Down

0 comments on commit 702c1b7

Please sign in to comment.