Knuckle Cracker

Creeper World 4 => Making Maps, Units, and Scripts => Topic started by: bluebolt on December 05, 2020, 10:50:43 PM

Title: 4RPL syntax highlighter
Post by: bluebolt on December 05, 2020, 10:50:43 PM
I have created a syntax highlighter for me to better understand what I'm working with! As it has been a couple days since release, I'm putting it here.
This is only for Notepad++ however, as that is the editor I work with when doing 4RPL programming.

Please note that this is by far, not complete. If I find the time and knowledge necessary to update it, I will, but this should be good for getting started. Some of the keywords may not be highlighted and should be, or should not be and are.

4RPL documentation is still not available(and won't be for some time), which is why this isn't complete. This is not a proper substitute either, but it helps immensely in reading. This is really for those brave enough to delve into the code without much help.
-Edit: Documentation is available now, here: https://knucklecracker.com/wiki/doku.php?id=4rpl:start (https://knucklecracker.com/wiki/doku.php?id=4rpl:start)

Features:
Uses no backgrounds but the theme's. This means it can run in both default and dark themes in N++!
Text color will also default to the theme's if it's not highlighted.

In order to use this one size fits all syntax highlighter, download it and import it using the user-defined language option under language in notepad++.

Images are at the bottom: White mode is default theme, dark is twilight.
Title: Re: 4RPL syntax highlighter
Post by: UberWaffe on December 06, 2020, 03:07:50 AM
Awesome, thanks!

Busy getting into 4RPL, and this is very helpful.
Title: Re: 4RPL syntax highlighter
Post by: Edswor on December 06, 2020, 12:53:00 PM
Thank you. I was thinking of doing something similar but you just saved me the time ;) .
Title: Re: 4RPL syntax highlighter
Post by: sgmr29 on December 13, 2020, 11:28:04 AM
Dumb question, but where did you even find a definition of the 4RPL syntax?  The most promising link I've found is https://knucklecracker.com/wiki/doku.php?id=4rpl , but I don't have permission to view the page!

Oops, I can't read.  You said in your post that it isn't available yet.
Title: Re: 4RPL syntax highlighter
Post by: bluebolt on January 09, 2021, 07:00:30 PM
I've uploaded version 0.3 of the highlighter(see original post), edited using the api as a reference. Primary things to note:
-All constants are now properly highlighted as such(including Rad2Deg and similar)
-I/J/K are now highlighted like the rest of the flow keywords(if, do, while are all flow keywords)
-All math operations are now included
-All vector operations(including V3 and such) are highlighted like the rest of the "math"
-$$varname: has been added; this variable type is the same as $varname: except it does not show up in the editor interface(which means it can't be edited per individual unit, only edited in the actual script)

As this was done by copy/paste and reformatting, the old keywords that are not part of 4rpl have not been kept from previous versions.