Raised This Month: $209 Target: $400
 52% 

Regarding certain statements and such.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-18-2016 , 22:02   Regarding certain statements and such.
Reply With Quote #1

So I'm currently working on a Notepad++ syntax highlighting project to create a new syntax highlighting setup for SourcePawn. I'm basing most of it off of Notepad++'s stock C++ highlighting. Here's how I've organized things like statements thus far.

Keywords1: new for if else do while switch case default return break continue sizeof true false typedef delete

Keywords2: Plugin Action void int float char bool Float String any Handle decl stock forward funcenum functag native function methodmap property typeset view_as cast_as var let public const enum static union struct

And for operators, I've got the following:
Code:
<Keywords name="Operators1">! @ % ^ &amp; * ( ) - | || = + ~ [ ] . , : ; / &lt; &gt; &lt;= =&lt; &gt;= =&gt; ?</Keywords>
<Keywords name="Operators2"></Keywords> // Empty
Is there anything I'm missing from these? Also, is there anything that SourcePawn as a language doesn't use that I should remove? I want to make sure I'm not missing anything before I start adding in .inc file class/type highlighting.

Here's what I've got style-wise so far. I plan to release this once I finish it. Also, I'm open to suggestions about the highlighting color/bold/etc of specific things.
- My highlighting (font is Inconsolata, before you even ask )
- Notepad++'s stock C++ highlighting, for comparison
__________________
Plugin Developer for cTF2w & Creators.TF


Last edited by 404UNF; 11-18-2016 at 22:02.
404UNF is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-20-2016 , 00:55   Re: Regarding certain statements and such.
Reply With Quote #2

I take the lack of replies in a day to mean that I'm not missing anything which is good news, everyone!
__________________
Plugin Developer for cTF2w & Creators.TF


Last edited by 404UNF; 11-20-2016 at 00:55.
404UNF is offline
blaacky
Senior Member
Join Date: Oct 2012
Old 11-20-2016 , 01:07   Re: Regarding certain statements and such.
Reply With Quote #3

Maybe << and >>?
blaacky is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-20-2016 , 01:37   Re: Regarding certain statements and such.
Reply With Quote #4

I'll add those in under...er...operators, I assume? I do want to release this highlighting thing when I finish it so I want it to be as complete as possible.

I'm also looking into utilizing some regex expressions in Notepad++'s functionList.xml file to allow for highlighting of certain things similar to how Notepad++ does highlighting for languages such as CPP. It's been really quite interesting learning regex because I always saw it as a confusing clusterfuck of symbols.
__________________
Plugin Developer for cTF2w & Creators.TF

404UNF is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 11-20-2016 , 01:49   Re: Regarding certain statements and such.
Reply With Quote #5

Quote:
Originally Posted by abrandnewday View Post
I'll add those in under...er...operators, I assume? I do want to release this highlighting thing when I finish it so I want it to be as complete as possible.

I'm also looking into utilizing some regex expressions in Notepad++'s functionList.xml file to allow for highlighting of certain things similar to how Notepad++ does highlighting for languages such as CPP. It's been really quite interesting learning regex because I always saw it as a confusing clusterfuck of symbols.
I believe << and >> are used to shift.
< and > are operators.
__________________
retired
shavit is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-20-2016 , 02:12   Re: Regarding certain statements and such.
Reply With Quote #6

Quote:
Originally Posted by shavit View Post
I believe << and >> are used to shift.
< and > are operators.
...bit-shift operators are still operators.

Edit: For that matter, ++ and -- are also operators
__________________
Am I back? Well, we'll see.

Last edited by Powerlord; 11-20-2016 at 02:15.
Powerlord is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-20-2016 , 02:37   Re: Regarding certain statements and such.
Reply With Quote #7

As is == and I didn't have that listed. Hell is wrong with me. I had || but not ==. Oh, and &&. I mean, I think Notepad++'s syntax highlighting can detect when you do "==" if you already have "=" defined, but I'm adding these in for the sake of completeness.
__________________
Plugin Developer for cTF2w & Creators.TF


Last edited by 404UNF; 11-20-2016 at 02:39.
404UNF is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 11-20-2016 , 03:45   Re: Regarding certain statements and such.
Reply With Quote #8

You might as well add in such things as += and -= as well.
__________________
Maxximou5 is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 11-20-2016 , 04:35   Re: Regarding certain statements and such.
Reply With Quote #9

I was trying to remember what those two were.
__________________
Plugin Developer for cTF2w & Creators.TF

404UNF is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 11-20-2016 , 18:53   Re: Regarding certain statements and such.
Reply With Quote #10

Quote:
Originally Posted by abrandnewday View Post
I was trying to remember what those two were.
https://en.wikipedia.org/wiki/Operat..._C_and_C%2B%2B
__________________
luki1412 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:58.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode