Som Python syntax highlighting (Work in progress)

As a Python enjoyer, I don’t like the lack of Python in Roblox. So I just plan to make game that is like “Lua Learning” except it uses Python instead. Here’s my syntax highlighting for Python, which is in work of progress (probably not).

Only strings and comments gets highlighted.

Also, the cursor is disabled due to Cursor is enabled but the issue is still about the RichText bug where the text offsets a bit.

Update #1: Added highlighting for keywords and demostrated it by using a binary search plus insertion sort from this site.

Update #2: Brackets get colors!

Update #3: Numbers get colors too!
image
Oh and also, I added the cursor back because I found some workarounds to fix this issue, temporarily.

Update #3.5: Just showing off this cool algorithm I found with updated syntax highlighting.

Update #4: Built-in functions get colors too!!!

Well, what do you think?

4 Likes

the syntax highlighting itself is very cool :cold_face:

but im curious how would you run the python script? are you gonna make a custom interpreter?

1 Like

Yes. It will be just like the Lua thingy boatbomber has made.

I will probably run the Python script using the lexer which you are seeing right now.

P.S.: I meant that I will run this script by using the lexer to turn characters into words or tokens, then using a parser to turn them into tree looking things and use some sort of evaluator to understand and execute them.

1 Like