Skip to content

fix: Compound assignments for rvalued variables and null deref - #248

Merged
paxcut merged 4 commits into
WerWolv:masterfrom
MangoMagoCane:pointer_deref_fix
Sep 2, 2026
Merged

fix: Compound assignments for rvalued variables and null deref#248
paxcut merged 4 commits into
WerWolv:masterfrom
MangoMagoCane:pointer_deref_fix

Conversation

@MangoMagoCane

Copy link
Copy Markdown
Contributor

Even though the assignment operator is now supported for rvalued variables compound assignment still resulted on parser errors. This PR aims at adding full support of all compound assignments to rvalued variables. The previous implementation of assignment for rvalues was left intact and a new set of functions were added to integrate rvalues with the existing lvalues compound assignment support.
Checks for null pointers and null expressions were also added to the parser implementation. errorCollector was also modified so its state gets reset alongside the parser in case a predicate function fails to parse.

paxcut and others added 4 commits August 28, 2026 17:33
Even though the assignment operator is now supported for rvalued variables compound assignment still resulted on parser errors. This PR aims at adding full support of all compound assignments to rvalued variables. The previous implementation of assignment for rvalues was left intact and a new set of functions were added to integrate rvalues with the existing lvalues compound assignment support.
parent and this keywords were not being detected even when they can be used. parent can be assigned to in function statements too. Added a system to select which keywords can be used during detection to generate compiler errors when possible. Many thanks to @majocane in discord for reporting the missing operations and help debugging and figuring thinks out.
@paxcut
paxcut merged commit f69cc80 into WerWolv:master Sep 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants