Implemented source tracking and type checking
All checks were successful
/ test (push) Successful in 21s

This commit is contained in:
Eduard Urbach 2025-06-27 00:05:16 +02:00
parent 70c2da4a4d
commit 329fcfff6f
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
30 changed files with 427 additions and 125 deletions

View file

@ -8,7 +8,7 @@ import (
func (f *Function) CheckDeadCode() error {
for instr := range f.Values {
if instr.IsConst() && instr.Alive() == 0 {
return errors.New(&UnusedValue{Value: instr.String()}, f.File, instr.Token().Position)
return errors.New(&UnusedValue{Value: instr.String()}, f.File, instr.Start())
}
}