Skip to content

Commit

Permalink
Changed & to bitand and | to bitor in the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlatAssembler committed Mar 8, 2025
1 parent fc9a69e commit 38771c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ AssemblyCode TreeNode::compile(CompilationContext context) const {
<< std::endl;
if (variableName.text.back() != '[') { // If it's not an array.
context.localVariables[variableName.text] = 0;
for (auto &pair : context.localVariables)
for (auto bitand pair : context.localVariables)
pair.second += isPointerType(childNode.text)
? 4
: basicDataTypeSizes.at(childNode.text);
Expand Down Expand Up @@ -381,7 +381,7 @@ AssemblyCode TreeNode::compile(CompilationContext context) const {
variableName.children[0]
.interpretAsACompileTimeIntegerConstant();
context.localVariables[variableName.text] = 0;
for (auto &pair : context.localVariables)
for (auto bitand pair : context.localVariables)
pair.second += arraySizeInBytes;
context.variableTypes[variableName.text] = childNode.text;
context.placesOfVariableDeclarations[variableName.text] =
Expand Down

0 comments on commit 38771c3

Please sign in to comment.