Skip to content

Commit ba37573

Browse files
committed
Make NQP compreg when loaded as a module.
1 parent 36f5853 commit ba37573

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/NQP/Compiler.pm

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
class NQP::Compiler is HLL::Compiler {
22
}
33

4+
# Create and configure compiler object.
5+
my $nqpcomp := NQP::Compiler.new();
6+
$nqpcomp.language('nqp');
7+
$nqpcomp.parsegrammar(NQP::Grammar);
8+
$nqpcomp.parseactions(NQP::Actions);
9+
hll-config($nqpcomp.config);
10+
11+
# Add extra command line options.
12+
my @clo := $nqpcomp.commandline_options();
13+
@clo.push('parsetrace');
14+
@clo.push('setting=s');
15+
@clo.push('setting-path=s');
16+
@clo.push('module-path=s');
17+
@clo.push('vmlibs=s');
18+
@clo.push('no-regex-lib');
19+
@clo.push('old-regex-lib');
20+
421
sub MAIN(@ARGS) {
5-
# Create and configure compiler object.
6-
my $nqpcomp := NQP::Compiler.new();
7-
$nqpcomp.language('nqp');
8-
$nqpcomp.parsegrammar(NQP::Grammar);
9-
$nqpcomp.parseactions(NQP::Actions);
10-
hll-config($nqpcomp.config);
11-
12-
# Add extra command line options.
13-
my @clo := $nqpcomp.commandline_options();
14-
@clo.push('parsetrace');
15-
@clo.push('setting=s');
16-
@clo.push('setting-path=s');
17-
@clo.push('module-path=s');
18-
@clo.push('vmlibs=s');
19-
@clo.push('no-regex-lib');
20-
@clo.push('old-regex-lib');
21-
2222
# Enter the compiler.
2323
$nqpcomp.command_line(@ARGS, :encoding('utf8'), :transcode('ascii iso-8859-1'));
2424

0 commit comments

Comments
 (0)