Skip to content

Commit db9b5d0

Browse files
committed
Spell check
1 parent 2461185 commit db9b5d0

12 files changed

Lines changed: 59 additions & 59 deletions

File tree

modules/Container/MeshNetwork.mpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ export namespace CppUtils::Container
3939
auto& branches = node0Ref.value.branches;
4040
if (auto branchIt = branches.find(key1); branchIt != std::cend(branches))
4141
{
42-
auto& childs = branchIt->second;
43-
if (auto childIt = std::find_if(std::cbegin(childs), std::cend(childs), [&](const auto& child) -> bool {
42+
auto& children = branchIt->second;
43+
if (auto childIt = std::find_if(std::cbegin(children), std::cend(children), [&](const auto& child) -> bool {
4444
return SafeShared{child} == node1;
4545
});
46-
childIt != std::cend(childs))
47-
childs.erase(childIt);
48-
if (std::empty(childs))
46+
childIt != std::cend(children))
47+
children.erase(childIt);
48+
if (std::empty(children))
4949
branches.erase(branchIt);
5050
}
5151
node0Ref.detachChild(node1, node1Ref);

old/Parameters/Parameters.old.mpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export namespace CppUtils::Language::Parameters
5858
const auto src = String::concatenateStringsWithSeparator(argumentVector, " ");
5959
const auto commandTree = m_grammarLexer.parseLanguage("main"_token, src);
6060
auto parameters = std::map<std::string, std::string>{};
61-
for (const auto& command : commandTree.childs)
62-
parameters[std::string{std::get<Type::Token>(command.getChildValue(0)).name}] = (command.childs.size() == 2 ? std::get<std::string>(command.getChildValue(1)) : "");
61+
for (const auto& command : commandTree.children)
62+
parameters[std::string{std::get<Type::Token>(command.getChildValue(0)).name}] = (command.children.size() == 2 ? std::get<std::string>(command.getChildValue(1)) : "");
6363
return parameters;
6464
}
6565

old/Sources/Language/ASM/Compiler/CompilationFunctions.old.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace CppUtils::Language::ASM::Compiler
3939
{
4040
using namespace Type::Literals;
4141
const auto lhs = std::get<std::uintptr_t>(astNode.getChildValue(0));
42-
context.compiler.get().compile(astNode.childs.at(1), context);
42+
context.compiler.get().compile(astNode.children.at(1), context);
4343
const auto rhs = context.returnRegister;
4444
context.addInstruction(context.createInstruction("move"_token, lhs, rhs));
4545
}
@@ -48,14 +48,14 @@ namespace CppUtils::Language::ASM::Compiler
4848
{
4949
using namespace Type::Literals;
5050
const auto lhs = std::get<std::uintptr_t>(astNode.getChildValue(0));
51-
context.compiler.get().compile(astNode.childs.at(1), context);
51+
context.compiler.get().compile(astNode.children.at(1), context);
5252
const auto rhs = context.returnRegister;
5353
context.addInstruction(context.createInstruction("add"_token, lhs, rhs));
5454
}
5555

5656
static void compileLabel(const Lexer::ASTNode& astNode, Context& context)
5757
{
58-
context.compiler.get().compile(astNode.childs.at(1), context);
58+
context.compiler.get().compile(astNode.children.at(1), context);
5959
}
6060
};
6161
}

old/Sources/Language/ASM/Compiler/Compiler.old.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace CppUtils::Language::ASM::Compiler
3434
auto astNode = Lexer::parse(src);
3535
auto output = Output{};
3636
auto context = Context{m_compiler, std::ref(output)};
37-
m_compiler.compile(astNode.childs, context);
37+
m_compiler.compile(astNode.children, context);
3838
return output;
3939
}
4040

old/Sources/Language/IR/Compiler/CompilationFunctions.old.hpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace CppUtils::Language::IR::Compiler
2323

2424
static void compileComma(const Lexer::ASTNode& astNode, Context& context)
2525
{
26-
for (const auto& child : astNode.childs)
26+
for (const auto& child : astNode.children)
2727
context.compiler.get().compile(child, context);
2828
}
2929

@@ -51,9 +51,9 @@ namespace CppUtils::Language::IR::Compiler
5151
{
5252
using namespace Type::Literals;
5353
const auto lhsIsDeref = (astNode.getChildValue(0) == "deref"_token);
54-
context.compiler.get().compile(lhsIsDeref ? astNode.childs.at(0).childs.at(0) : astNode.childs.at(0), context);
54+
context.compiler.get().compile(lhsIsDeref ? astNode.children.at(0).children.at(0) : astNode.children.at(0), context);
5555
const auto lhs = context.returnRegister;
56-
context.compiler.get().compile(astNode.childs.at(1), context);
56+
context.compiler.get().compile(astNode.children.at(1), context);
5757
const auto rhs = context.returnRegister;
5858
context.returnRegister = lhs;
5959
context.addInstruction(context.createInstruction(lhsIsDeref ? "write"_token : "copy"_token, lhs, rhs));
@@ -62,9 +62,9 @@ namespace CppUtils::Language::IR::Compiler
6262
static void compileEq(const Lexer::ASTNode& astNode, Context& context)
6363
{
6464
using namespace Type::Literals;
65-
context.compiler.get().compile(astNode.childs.at(0), context);
65+
context.compiler.get().compile(astNode.children.at(0), context);
6666
const auto lhs = context.returnRegister;
67-
context.compiler.get().compile(astNode.childs.at(1), context);
67+
context.compiler.get().compile(astNode.children.at(1), context);
6868
const auto rhs = context.returnRegister;
6969
context.returnRegister = lhs;
7070
context.addInstruction(context.createInstruction("eq"_token, lhs, rhs));
@@ -73,9 +73,9 @@ namespace CppUtils::Language::IR::Compiler
7373
static void compileAdd(const Lexer::ASTNode& astNode, Context& context)
7474
{
7575
using namespace Type::Literals;
76-
context.compiler.get().compile(astNode.childs.at(0), context);
76+
context.compiler.get().compile(astNode.children.at(0), context);
7777
const auto lhs = context.returnRegister;
78-
context.compiler.get().compile(astNode.childs.at(1), context);
78+
context.compiler.get().compile(astNode.children.at(1), context);
7979
const auto rhs = context.returnRegister;
8080
context.returnRegister = lhs;
8181
context.addInstruction(context.createInstruction("add"_token, lhs, rhs));
@@ -84,32 +84,32 @@ namespace CppUtils::Language::IR::Compiler
8484
static void compileSub(const Lexer::ASTNode& astNode, Context& context)
8585
{
8686
using namespace Type::Literals;
87-
context.compiler.get().compile(astNode.childs.at(0), context);
87+
context.compiler.get().compile(astNode.children.at(0), context);
8888
const auto lhs = context.returnRegister;
89-
context.compiler.get().compile(astNode.childs.at(1), context);
89+
context.compiler.get().compile(astNode.children.at(1), context);
9090
const auto rhs = context.returnRegister;
9191
context.returnRegister = lhs;
9292
context.addInstruction(context.createInstruction("sub"_token, lhs, rhs));
9393
}
9494

9595
static void compileLabel(const Lexer::ASTNode& astNode, Context& context)
9696
{
97-
const auto& label = std::get<Type::Token>(astNode.childs.at(1).value);
97+
const auto& label = std::get<Type::Token>(astNode.children.at(1).value);
9898
context.addFunction(label, 0);
99-
context.compiler.get().compile(astNode.childs.at(2), context);
99+
context.compiler.get().compile(astNode.children.at(2), context);
100100
}
101101

102102
static void compileRet(const Lexer::ASTNode& astNode, Context& context)
103103
{
104104
using namespace Type::Literals;
105-
context.compiler.get().compile(astNode.childs.at(0), context);
105+
context.compiler.get().compile(astNode.children.at(0), context);
106106
context.addInstruction(context.createInstruction("ret"_token, context.returnRegister));
107107
}
108108

109109
static void compileDeref(const Lexer::ASTNode& astNode, Context& context)
110110
{
111111
using namespace Type::Literals;
112-
context.compiler.get().compile(astNode.childs.at(0), context);
112+
context.compiler.get().compile(astNode.children.at(0), context);
113113
context.addInstruction(context.createInstruction("read"_token, context.returnRegister));
114114
}
115115

@@ -120,7 +120,7 @@ namespace CppUtils::Language::IR::Compiler
120120
const auto returnRegister = context.newRegister(), functionLabel = context.newRegister();
121121
context.addInstruction(context.createInstruction(functionLabel, functionName.name));
122122
auto parameters = std::vector<std::uintptr_t>{returnRegister, functionLabel};
123-
std::transform(astNode.childs.begin() + 1, astNode.childs.end(), std::back_inserter(parameters), [&context](const auto& astNode) -> std::uintptr_t {
123+
std::transform(astNode.children.begin() + 1, astNode.children.end(), std::back_inserter(parameters), [&context](const auto& astNode) -> std::uintptr_t {
124124
context.compiler.get().compile(astNode, context);
125125
return context.returnRegister;
126126
});
@@ -131,10 +131,10 @@ namespace CppUtils::Language::IR::Compiler
131131
static void compileIf(const Lexer::ASTNode& astNode, Context& context)
132132
{
133133
using namespace Type::Literals;
134-
context.compiler.get().compile(astNode.childs.at(0), context);
134+
context.compiler.get().compile(astNode.children.at(0), context);
135135
auto* ifnz = context.createInstruction("ifnz"_token, context.returnRegister);
136136
context.addInstruction(ifnz);
137-
context.compiler.get().compile(astNode.childs.at(1), context);
137+
context.compiler.get().compile(astNode.children.at(1), context);
138138
ifnz->conditionInstruction = ifnz->nextInstruction;
139139
auto* nop = context.createInstruction();
140140
context.addInstruction(nop);
@@ -144,10 +144,10 @@ namespace CppUtils::Language::IR::Compiler
144144
static void compileWhile(const Lexer::ASTNode& astNode, Context& context)
145145
{
146146
using namespace Type::Literals;
147-
context.compiler.get().compile(astNode.childs.at(0), context);
147+
context.compiler.get().compile(astNode.children.at(0), context);
148148
auto* ifnz = context.createInstruction("ifnz"_token, context.returnRegister);
149149
context.addInstruction(ifnz);
150-
context.compiler.get().compile(astNode.childs.at(1), context);
150+
context.compiler.get().compile(astNode.children.at(1), context);
151151
ifnz->conditionInstruction = ifnz->nextInstruction;
152152
auto* endThen = context.lastInstruction;
153153
auto* nop = context.createInstruction();

old/Sources/Language/IR/Compiler/Compiler.old.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace CppUtils::Language::IR::Compiler
4141
auto output = Output{};
4242
buildStrings(astNode, output.stringConstants);
4343
auto context = Context{m_compiler, std::ref(output)};
44-
m_compiler.compile(astNode.childs, context);
44+
m_compiler.compile(astNode.children, context);
4545
return output;
4646
}
4747

old/Sources/Language/Ini/IniLexer.old.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace CppUtils::Language::Ini
2929
}))};
3030
if (string.empty())
3131
return false;
32-
parentNode.get().childs.emplace_back(Parser::ASTNode<Type::Token, bool, float, std::string>{std::move(string)});
32+
parentNode.get().children.emplace_back(Parser::ASTNode<Type::Token, bool, float, std::string>{std::move(string)});
3333
return true;
3434
};
3535

old/Sources/Language/Xml/XmlLexer.old.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace CppUtils::Language::Xml
1919
}))};
2020
if (string.empty())
2121
return false;
22-
parentNode.get().childs.emplace_back(Parser::ASTNode<Type::Token, std::string>{std::move(string)});
22+
parentNode.get().children.emplace_back(Parser::ASTNode<Type::Token, std::string>{std::move(string)});
2323
return true;
2424
};
2525

@@ -30,10 +30,10 @@ namespace CppUtils::Language::Xml
3030

3131
static const auto closingTagValidator = [](auto& context) -> bool {
3232
auto& parentNode = context.parentNode.get();
33-
const auto& closingTag = parentNode.childs.back().value;
33+
const auto& closingTag = parentNode.children.back().value;
3434
if (closingTag != parentNode.value)
3535
return false;
36-
parentNode.childs.pop_back();
36+
parentNode.children.pop_back();
3737
return true;
3838
};
3939

old/UnitTests/Language/IR/Lexer/Lexer.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ namespace CppUtils::UnitTests::Language::IR::Lexer
1919
)"sv);
2020

2121
CppUtils::Log::TreeNodeLogger::log(irTree);
22-
EXPECT(irTree.childs.size() == 1);
23-
EXPECT(irTree.childs[0].childs.size() == 3);
24-
EXPECT(irTree.childs[0].childs[2].childs.size() == 3);
22+
EXPECT(irTree.children.size() == 1);
23+
EXPECT(irTree.children[0].children.size() == 3);
24+
EXPECT(irTree.children[0].children[2].children.size() == 3);
2525
});
2626

2727
addTest("Pointers", [] {
@@ -40,9 +40,9 @@ namespace CppUtils::UnitTests::Language::IR::Lexer
4040
}
4141
)"sv);
4242
CppUtils::Log::TreeNodeLogger::log(irTree);
43-
EXPECT(irTree.childs.size() == 2);
44-
EXPECT(irTree.childs[0].childs.size() == 3);
45-
EXPECT(irTree.childs[0].childs.at(2).childs.size() == 4);
43+
EXPECT(irTree.children.size() == 2);
44+
EXPECT(irTree.children[0].children.size() == 3);
45+
EXPECT(irTree.children[0].children.at(2).children.size() == 4);
4646
});
4747

4848
addTest("Conditions", [] {
@@ -65,9 +65,9 @@ namespace CppUtils::UnitTests::Language::IR::Lexer
6565
}
6666
)"sv);
6767
CppUtils::Log::TreeNodeLogger::log(irTree);
68-
EXPECT(irTree.childs.size() == 2);
69-
EXPECT(irTree.childs[0].childs.size() == 3);
70-
EXPECT(irTree.childs[0].childs[2].childs.size() == 3);
68+
EXPECT(irTree.children.size() == 2);
69+
EXPECT(irTree.children[0].children.size() == 3);
70+
EXPECT(irTree.children[0].children[2].children.size() == 3);
7171
});
7272
}
7373
}

old/UnitTests/Language/Ini/IniLexer.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ namespace CppUtils::UnitTests::Language::Ini::IniLexer
114114
}
115115
}
116116
)"_json;
117-
EXPECT(iniTree.childs.size() == 3);
118-
EXPECT(iniTree.childs[0] == jsonTree.childs.at(0));
119-
EXPECT(iniTree.childs[1].at("Numbers"_token).childs.size() == 8);
120-
EXPECT(iniTree.childs[2].at("Booleans"_token).childs.size() == 2);
117+
EXPECT(iniTree.children.size() == 3);
118+
EXPECT(iniTree.children[0] == jsonTree.children.at(0));
119+
EXPECT(iniTree.children[1].at("Numbers"_token).children.size() == 8);
120+
EXPECT(iniTree.children[2].at("Booleans"_token).children.size() == 2);
121121
});
122122
}
123123
}

0 commit comments

Comments
 (0)