Simplified standard library

This commit is contained in:
Eduard Urbach 2025-02-17 17:49:42 +01:00
parent 6eab48c586
commit 930b5e16f4
Signed by: eduard
GPG key ID: 49226B848C78F6C8
25 changed files with 232 additions and 231 deletions

View file

@ -31,7 +31,12 @@ func (f *Function) ToNumber(t token.Token) (int, error) {
}
number, err := strconv.Atoi(digits)
return number, err
if err != nil {
return 0, errors.New(err, f.File, t.Position)
}
return number, nil
case token.Rune:
r := t.Bytes(f.File.Bytes)