mirror of
https://gitee.com/RubyMetric/chsrc.git
synced 2025-12-25 20:52:49 +00:00
Move `postfix` config value into Config
This commit is contained in:
parent
d15d865cc5
commit
e0396164ac
|
|
@ -79,9 +79,22 @@ class SectionConfig {
|
|||
return self.get-inherited-config('prefix', '_rawstr4c');
|
||||
}
|
||||
|
||||
#| RS4C-Mode 或 RS4C-String
|
||||
#| RS4C-String
|
||||
method postfix() {
|
||||
return self.get-inherited-config('postfix', ':use-language');
|
||||
# RS4C-Mode 或 RS4C-String
|
||||
my $config-postfix = self.get-inherited-config('postfix', ':use-language');
|
||||
|
||||
my $language = self.language.string-value;
|
||||
my $postfix;
|
||||
|
||||
if $config-postfix.is-mode() && $config-postfix.mode-value() eq 'use-language' {
|
||||
$postfix = 'in_' ~ $language;
|
||||
} else {
|
||||
# 如果不是模式,那就是用户给了一个具体的字符串
|
||||
$postfix = $config-postfix.string-value();
|
||||
}
|
||||
|
||||
return Parser::ConfigItem's-Value.new($postfix);
|
||||
}
|
||||
|
||||
#| RS4C-Bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue