Log In  

Hey, first of all, excuse my poor photoshopping (Using Krita on Linux, terrible tool. No idea why I'm not using Gimp).

But anyways... What if, while in the code editor, you could hold down a key (maybe ALT?) and it would turn all tokens into coloured blobs. So you could instantly see where and how most of them are used up.

Something like this:

Additionally, maybe instead of being randomly coloured, certain tokens (such as keywords, variable names, separators, etc...) could have a dedicated colour to them.

Now, disclaimer... I don't actually know how the tokens work exactly, I just coloured in the tokens as I felt.

The token blocks themselves, should also look more like this, but in pico8 colour palette:

but I think the image gets the point across even with my terrible photoshopping.

P#40185 2017-05-04 12:03 ( Edited 2017-05-07 19:00)

Naturally the syntax coloring already gives you some idea of what a token is. It sounds like you want a different representation that indicates the token weight of a line or block of code independent of character weight, in which case it might be better if each token bar had an equal width.

You'll want a special display for the edge case for characters that do not contribute to the token count. Comments, spaces, and some keywords are not counted as tokens to encourage good coding practices.

This isn't inline with the code editor, but if it's useful, picotool can make a modest token visualization: p8tool listtokens.

P#40281 2017-05-07 15:00 ( Edited 2017-05-07 19:00)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-10-14 21:37 | 0.009s | 2097k | Q:11