mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-21 23:59:33 +08:00
Move name
config value into Config
This commit is contained in:
parent
f26817f433
commit
2a27fd4fc1
@ -99,9 +99,19 @@ class SectionConfig {
|
|||||||
return self.get-direct-config('language');
|
return self.get-direct-config('language');
|
||||||
}
|
}
|
||||||
|
|
||||||
#| RS4C-String 或 RS4C-Nil
|
#| RS4C-String
|
||||||
method name() {
|
method name() {
|
||||||
return self.get-direct-config('name');
|
# RS4C-String 或 RS4C-Nil
|
||||||
|
my $config-name = self.get-direct-config('name');
|
||||||
|
|
||||||
|
my $name;
|
||||||
|
|
||||||
|
if $config-name.is-nil {
|
||||||
|
$name = $.section.title.lc
|
||||||
|
} else {
|
||||||
|
$name = $config-name.string-value;
|
||||||
|
}
|
||||||
|
return Parser::ConfigItem's-Value.new($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#| RS4C-Bool
|
#| RS4C-Bool
|
||||||
|
@ -76,15 +76,7 @@ my class CVariableNameGenerator {
|
|||||||
my $keep-prefix = $config.keep-prefix.bool-value;
|
my $keep-prefix = $config.keep-prefix.bool-value;
|
||||||
my $keep-postfix = $config.keep-postfix.bool-value;
|
my $keep-postfix = $config.keep-postfix.bool-value;
|
||||||
|
|
||||||
my $config-name = $config.name;
|
my $name = $config.name.string-value;
|
||||||
my $name;
|
|
||||||
|
|
||||||
if $config-name.is-nil() {
|
|
||||||
$name = $section.title.lc
|
|
||||||
} else {
|
|
||||||
$name = $config-name.string-value;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $namespace = $config.namespace.string-value;
|
my $namespace = $config.namespace.string-value;
|
||||||
my $name-literally = $config.name-literally.bool-value;
|
my $name-literally = $config.name-literally.bool-value;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user