Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make NQP compreg when loaded as a module.
  • Loading branch information
jnthn committed Dec 20, 2012
1 parent 36f5853 commit ba37573
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/NQP/Compiler.pm
@@ -1,24 +1,24 @@
class NQP::Compiler is HLL::Compiler {
}

# Create and configure compiler object.
my $nqpcomp := NQP::Compiler.new();
$nqpcomp.language('nqp');
$nqpcomp.parsegrammar(NQP::Grammar);
$nqpcomp.parseactions(NQP::Actions);
hll-config($nqpcomp.config);

# Add extra command line options.
my @clo := $nqpcomp.commandline_options();
@clo.push('parsetrace');
@clo.push('setting=s');
@clo.push('setting-path=s');
@clo.push('module-path=s');
@clo.push('vmlibs=s');
@clo.push('no-regex-lib');
@clo.push('old-regex-lib');

sub MAIN(@ARGS) {
# Create and configure compiler object.
my $nqpcomp := NQP::Compiler.new();
$nqpcomp.language('nqp');
$nqpcomp.parsegrammar(NQP::Grammar);
$nqpcomp.parseactions(NQP::Actions);
hll-config($nqpcomp.config);

# Add extra command line options.
my @clo := $nqpcomp.commandline_options();
@clo.push('parsetrace');
@clo.push('setting=s');
@clo.push('setting-path=s');
@clo.push('module-path=s');
@clo.push('vmlibs=s');
@clo.push('no-regex-lib');
@clo.push('old-regex-lib');

# Enter the compiler.
$nqpcomp.command_line(@ARGS, :encoding('utf8'), :transcode('ascii iso-8859-1'));

Expand Down

0 comments on commit ba37573

Please sign in to comment.