# This file automatically generated by /friends/.rakubrew/versions/moar-main/tools/build/gen-cat.nqp #line 1 gen/moar/main-version.nqp sub hll-config($config) { ############################################################################################## # Included from /friends/.rakubrew/versions/moar-main/tools/templates/main-version-common.in # ############################################################################################## ### Language $config := 'Rakudo'; $config := '2023.10-100-g37fbee11d'; $config := ''; $config := ''; $config := 2; # Though language-revisions key provides more information # can-language-versions is used for speeding up and ordering # Perl6::Compiler.can_langauge_versions method $config := nqp::list('1', '2', '2.PREVIEW', '2.TEST', '2.TESTDEPR', '3', '3.PREVIEW', ); $config := nqp::hash( 1, nqp::hash( 'mods', nqp::hash( ), ), # revision 1 2, nqp::hash( 'mods', nqp::hash( 'PREVIEW', nqp::hash( ), # modificator PREVIEW 'TEST', nqp::hash( ), # modificator TEST 'TESTDEPR', nqp::hash( 'deprecate', 1, ), # modificator TESTDEPR ), ), # revision 2 3, nqp::hash( 'require', 'PREVIEW', 'mods', nqp::hash( 'PREVIEW', nqp::hash( 'require', 1, ), # modificator PREVIEW ), ), # revision 3 ); # This mapping is for quick-transforming of core setting name $config := nqp::hash( 'NULL.c', 'NULL.c', 'CORE.c', 'CORE.c', 'NULL.d', 'CORE.c', 'CORE.d', 'CORE.d', 'NULL.e', 'CORE.d', 'CORE.e', 'CORE.e', ); ### Location $config := '/friends/.rakubrew/versions/moar-main/install'; $config := '/friends/.rakubrew/versions/moar-main/install/share/perl6'; $config := '185f1ddba3bd3405b752874f2063524bd2434639'; ############################################################################################################# # End of section included from /friends/.rakubrew/versions/moar-main/tools/templates/main-version-common.in # ############################################################################################################# $config := '/friends/.rakubrew/versions/moar-main/install/share/nqp'; } #line 1 src/main.nqp use Perl6::Grammar; use Perl6::Actions; use Raku::Grammar; use Raku::Actions; use Perl6::Compiler; use Perl6::SysConfig; # Initialize Rakudo runtime support. nqp::p6init(); my %rakudo-build-config := nqp::hash(); hll-config(%rakudo-build-config); nqp::bindhllsym('default', 'SysConfig', Perl6::SysConfig.new(%rakudo-build-config)); # Create and configure compiler object. my $comp := Perl6::Compiler.new(); $comp.language('Raku'); if nqp::getenvhash() { $comp.parsegrammar(Raku::Grammar); $comp.parseactions(Raku::Actions); $comp.addstage('syntaxcheck', :before); $comp.addstage('qast', :after); } else { $comp.parsegrammar(Perl6::Grammar); $comp.parseactions(Perl6::Actions); $comp.addstage('syntaxcheck', :before); $comp.addstage('optimize', :after); } # Add extra command line options. my @clo := $comp.commandline_options(); @clo.push('parsetrace'); @clo.push('setting=s'); @clo.push('n'); @clo.push('p'); @clo.push('doc=s?'); @clo.push('rakudoc=s?'); @clo.push('optimize=s?'); @clo.push('c'); @clo.push('I=s'); @clo.push('M=s'); @clo.push('rakudo-home=s'); # Make Raku grammar / actions visible to HLL nqp::bindhllsym('Raku', 'Grammar', Raku::Grammar); nqp::bindhllsym('Raku', 'Actions', Raku::Actions); # Set up END block list, which we'll run at exit. nqp::bindhllsym('Raku', '@END_PHASERS', []); # In an embedding environment, let @*ARGS be empty instead of crashing nqp::bindhllsym('Raku', '$!ARGITER', 0); sub MAIN(@ARGS) { # Enter the compiler. my %defaults; if nqp::existskey(nqp::getenvhash, 'RAKUDO_OPT') { my @env-args := nqp::split(" ", nqp::getenvhash); my $p := HLL::CommandLine::Parser.new($comp.commandline_options); $p.add-stopper('-e'); $p.stop-after-first-arg; my $res := $p.parse(@env-args); if $res { %defaults := $res.options; } } my $*STACK-ID := 0; $comp.command_line(@ARGS, :encoding('utf8'), |%defaults); # do all the necessary actions at the end, if any if nqp::gethllsym('Raku', '&THE_END') -> $THE_END { $THE_END() } } # vim: set ft=perl6 nomodifiable :