Skip to content

Commit 4802c74

Browse files
authored
Merge branch 'WerWolv:master' into new_lexer
2 parents a5381d1 + 7e00014 commit 4802c74

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/include/pl/patterns/pattern_pointer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ namespace pl::ptrn {
5656
if (this->getSection() == id)
5757
return;
5858

59-
this->m_pointedAt->setSection(id);
59+
if (this->m_pointedAt != nullptr)
60+
this->m_pointedAt->setSection(id);
6061

6162
Pattern::setSection(id);
6263
}

lib/source/pl/core/ast/ast_node_function_definition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ namespace pl::core::ast {
9696
variable->setSection(pattern->getSection());
9797
variable->setOffset(pattern->getOffset());
9898
variable = pattern;
99+
originalNames.emplace_back(pattern, pattern->getVariableName());
99100
}
100101

101102
ctx->setVariable(name, params[paramIndex]);
102-
originalNames.emplace_back(variable, name);
103103
variable->setVariableName(name);
104104

105105
ctx->setCurrentControlFlowStatement(ControlFlowStatement::None);

lib/source/pl/core/ast/ast_node_pointer_variable_decl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace pl::core::ast {
7777

7878
auto pointerEndOffset = evaluator->getBitwiseReadOffset();
7979

80-
{
80+
if (evaluator->getSectionId() != ptrn::Pattern::InstantiationSectionId) {
8181
i128 pointerAddress = pattern->getValue().toSigned();
8282

8383
evaluator->setReadOffset(pointerStartOffset);
@@ -103,7 +103,6 @@ namespace pl::core::ast {
103103
if (this->m_placementSection != nullptr)
104104
pattern->setSection(evaluator->getSectionId());
105105

106-
107106
if (this->m_placementOffset != nullptr && !evaluator->isGlobalScope()) {
108107
evaluator->setBitwiseReadOffset(startOffset);
109108
} else {

0 commit comments

Comments
 (0)