Skip to content

Commit

Permalink
Fix use of language version/revision terminology
Browse files Browse the repository at this point in the history
I was probably using too much of 'language version' term with regard to
single-letter specifications, which are 'language revision'. This commit
sorts out this cleans up the mess.
  • Loading branch information
vrurg committed Nov 19, 2020
1 parent 6f31494 commit 7de2b15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/Perl6/Compiler.nqp
Expand Up @@ -81,6 +81,9 @@ class Perl6::Compiler is HLL::Compiler {
$!language_version := %*COMPILING<%?OPTIONS><language_version> || self.config<language-version>
}
}
method language_revision() {
nqp::substr(self.language_version,2,1)
}
method language_modifier() {
$!language_modifier
}
Expand Down
7 changes: 4 additions & 3 deletions src/Perl6/World.nqp
Expand Up @@ -693,9 +693,10 @@ class Perl6::World is HLL::World {
$!setting_revision := nqp::substr($!setting_name, 5, 1);
# Compile core with default language version unless the core revision is higher. I.e. when 6.d is the
# default only core.e will be compiled with 6.e compiler.
nqp::getcomp('Raku').set_language_version( nqp::isgt_s($!setting_revision, $default_revision)
?? $!setting_revision
!! $default_revision );
my $lang_ver := '6.' ~ (nqp::isgt_s($!setting_revision, $default_revision)
?? $!setting_revision
!! $default_revision);
nqp::getcomp('Raku').set_language_version($lang_ver);
}
$*UNIT.annotate('IN_DECL', 'mainline');
}
Expand Down

0 comments on commit 7de2b15

Please sign in to comment.