v0.3.0-dev.5
This commit is contained in:
parent
fb3550b8ec
commit
a1a208ba63
|
@ -63,34 +63,30 @@ private:
|
||||||
{
|
{
|
||||||
string line = configuration.readln();
|
string line = configuration.readln();
|
||||||
auto match = matchFirst(line, regular);
|
auto match = matchFirst(line, regular);
|
||||||
if (match)
|
|
||||||
|
if (match.length == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// if again main section
|
||||||
|
if (match[GROUP_SECTION_MAIN].length)
|
||||||
{
|
{
|
||||||
// if again main section
|
sectionName = match[GROUP_SECTION_MAIN];
|
||||||
if (match[GROUP_SECTION_MAIN].length)
|
continue;
|
||||||
{
|
|
||||||
sectionName = match[GROUP_SECTION_MAIN];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (match[GROUP_SECTION_OTHER_OUTER].length)
|
|
||||||
{
|
|
||||||
sectionName = match[GROUP_SECTION_OTHER_INNER];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int group = GROUP_VALUE_1;
|
|
||||||
|
|
||||||
if (match[group][0] == '\"')
|
|
||||||
group = GROUP_VALUE_2;
|
|
||||||
else if (match[group][0] == '\'')
|
|
||||||
group = GROUP_VALUE_3;
|
|
||||||
|
|
||||||
this.configs[configName].add(sectionName, ConfigParameter(match[GROUP_PROPERTY], match[group]));
|
|
||||||
|
|
||||||
// if (sectionName !in this.sections)
|
|
||||||
// this.sections[sectionName] = ConfigSection(sectionName);
|
|
||||||
|
|
||||||
// this.sections[sectionName].add(ConfigParameter(match[GROUP_PROPERTY], match[group]));
|
|
||||||
}
|
}
|
||||||
|
if (match[GROUP_SECTION_OTHER_OUTER].length)
|
||||||
|
{
|
||||||
|
sectionName = match[GROUP_SECTION_OTHER_INNER];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int group = GROUP_VALUE_1;
|
||||||
|
|
||||||
|
if (match[group][0] == '\"')
|
||||||
|
group = GROUP_VALUE_2;
|
||||||
|
else if (match[group][0] == '\'')
|
||||||
|
group = GROUP_VALUE_3;
|
||||||
|
|
||||||
|
this.configs[configName].add(sectionName, ConfigParameter(match[GROUP_PROPERTY], match[group]));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue