Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

byte* += long #398

Closed Akuli closed 9 months ago

Akuli commented 9 months ago
def game_is_possible(game_data: byte*) -> void:
    while *game_data != '\0':
        if *game_data == ';' or *game_data == ',':
            game_data++
        chunk_len = strcspn(game_data, ";,")
        game_data[chunk_len] = '\0'
        chunk = game_data
        game_data += chunk_len

Last line produces:

compiler error in file "part1.jou", line 10: addition produced a value of type long which cannot be assigned back to byte*

This message is wrong. Adding byte* and long is currently not possible at all, so the error message should instead say that they cannot be added.