Skip to content

Patches some stuff for Ashet development - #1003

Draft
ikskuh wants to merge 1 commit into
mainfrom
xq/ashet-patch-set
Draft

Patches some stuff for Ashet development#1003
ikskuh wants to merge 1 commit into
mainfrom
xq/ashet-patch-set

Conversation

@ikskuh

@ikskuh ikskuh commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

These are some fixes and changes i've made for Ashet. This PR is just so i don't forget pushing them, and we can merge them eventually

@Grazfather Grazfather left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not actually a review, just a Q about this part

diags.* = Diagnostics.init(token.index, "out of instructions", .{});
return error.Overflow;
}

const result, const ov = @addWithOverflow(instr_index.?, 1);
instr_index = if (ov != 0) null else result;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just return an error here instead of using an optional type and adding these checks? or maybe at the check once at the top of the loop?

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