Log In  


I would expect "in" to be pink and "all" to be green possibly in the below code, but they are both gray in Pico-8's code editor.

my_table={1,2,3}

for x in all(my_table) do
 print(x)
end
1


I think "in all" is a Pico-8 keyword, and not a standard LUA keyword.

I don't know why only standard lua keywords would be highlighted, though, so I guess I'm only pointing out trivia.


The only Lua keywords as defined in the language grammar are: and, break, do, else, elseif, end, false, for, function, goto, if, in, local, nil, not, or, repeat, return, then, true, until, while.

So yes, “in” should definitely be highlighted in pink. As for “all”, it could be highlighted in green just like “print”.


I have to say I agree with highlighting builtin functions. It helps you avoid overriding them by accident, since some of them are common words (e.g. color).

I do with some of the missing ones (like add() and del() for instance) were also colored.



[Please log in to post a comment]