Simplified standard library
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user