capy-language / capy

🍊 A statically typed, compiled programming language, largely inspired by Jai, Odin, and Zig.
Apache License 2.0
64 stars 4 forks source link

_very_ quick fix to #4 #8

Closed lenawanel closed 1 year ago

lenawanel commented 1 year ago

propagate None from arena indexes up to diagnostic generation

fixes #4

also added a few #[derive(Debug)] for convenience

also looking over the commit it seems like my editor did some auto-formatting (oops), do you have a policy on formatting for this repository?

NotAFlyingGoose commented 1 year ago

The style guide is "don't make the code look ugly." My format on save was off and it looks like your editor got some things I missed.

I'm gonna look at it properly tonight, but from first glace it looks like

func::() {
    y : [3]usize;
    y = 0;
}

might also activate the bug. could you look into it?

lenawanel commented 1 year ago

sure @NotAFlyingGoose :D

lenawanel commented 1 year ago

The style guide is "don't make the code look ugly." My format on save was off and it looks like your editor got some things I missed.

I'm gonna look at it properly tonight, but from first glace it looks like

func::() {
  y : [3]usize;
  y = 0;
}

might also activate the bug. could you look into it?

It doesn't activate the bug, I'll try fuzzing with a fitting corpus to see if there are similar bugs.

NotAFlyingGoose commented 1 year ago

It doesn't activate the bug, I'll try fuzzing with a fitting corpus to see if there are similar bugs.

Okay, something along the lines of mutation of something that doesn't have a body

lenawanel commented 1 year ago

It doesn't activate the bug, I'll try fuzzing with a fitting corpus to see if there are similar bugs.

Okay, something along the lines of mutation of something that doesn't have a body

I've been fuzzing for some time now, and this bug doesn't get triggered. tbf, I only used 5 seed files, and the bug is very dependent on the parser's error recovery, so I think it's a better idea to wrap the ranges in options.