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
P#42566 2017-07-17 10:51 ( Edited 2017-08-03 22:14)

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.

P#42596 2017-07-18 11:09 ( Edited 2017-07-18 15:09)

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”.

P#43024 2017-08-03 05:27 ( Edited 2017-08-03 09:27)

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.

P#43034 2017-08-03 18:14 ( Edited 2017-08-03 22:14)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 17:29:52 | 0.005s | Q:16