Skip to content

Commit e557b41

Browse files
committed
Add a way to get/set the current backend.
1 parent 018ca15 commit e557b41

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/HLL/Compiler.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ class HLL::Compiler does HLL::Backend::Default {
143143
}
144144
%!config := nqp::hash();
145145
}
146+
147+
method backend(*@value) {
148+
if @value {
149+
$!backend := @value[0];
150+
@!stages := nqp::split(' ', 'start parse ast ' ~ $!backend.stages());
151+
}
152+
$!backend
153+
}
146154

147155
method language($name?) {
148156
if $name {

0 commit comments

Comments
 (0)