olety / cjass

Preserving cjass code from code.google.com/p/cjass
0 stars 0 forks source link

Horus: update keywords #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
List of not-highlighted keywords:

// preprocessor
#for #endfor #repeat #endrepeat #sysinit #undef #setdef

// blocks and instructions
for endfor forp endforp do enddo while endwhile whilenot endwhilenot <flush 
locals>

// functions types
lambda callback

// functions
// all for conditions
UnitsOfType        (string unitname)
UnitsOfPlayer      (player p)
UnitsInRect        (rect r)
UnitsInRange       (real x, real y, real radius)
UnitsInRangeOfLoc  (location whichLocation, real radius)
UnitsSelected      (player p)
UnitsInGroup       (group g)
// all callbacks:
onInit                  ()
onUnitAttacked          ()
onUnitDeath             ()
onUnitDecay             ()
onUnitIssuedOrder       (?int order_id)
onUnitIssuedPointOrder  (?int order_id)
onUnitIssuedTargetOrder (?int order_id)
onHeroLevel             ()
onHeroSkill             ()
onUnitSpellChannel      (?int spell_id)
onUnitSpellCast         (?int spell_id)
onUnitSpellEffect       (?int spell_id)
onUnitSpellFinish       (?int spell_id)
onUnitSpellEndcast      (?int spell_id)
onUnitUseItem           (?int item_id)
onUnitPickupItem        (?int item_id)
onUnitDropItem          (?int item_id)
onUnitSellItem          (?int item_id)
onUnitPawnItem          (?int item_id)
onGameLoad              ()
onGameSave              ()
// counter
CounterInc()
CounterReset()

// constans
DATE TIME DEBUG COUNTER COUNTER_ST WEATHER_ON_MARS WAR3VER FUNCNAME 
AUTOFLUSH_LOCALS DEF_BOOLEXPR_TRUE DEF_BOOLEXPR_TRUE_FUNC IS_CUSTOM_BJ 
IS_CUSTOM_CJ null_cjnullex

Original issue reported on code.google.com by adi...@gmail.com on 24 Aug 2011 at 6:17

GoogleCodeExporter commented 9 years ago
please make it possible to add my own keywords, i'm expecting to see additional 
sql file.

Original comment by doctorge...@gmail.com on 24 Aug 2011 at 8:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Please submit a new request with your thoughts on improving the project.

Original comment by vand...@lol-game.ru on 24 Aug 2011 at 9:22

GoogleCodeExporter commented 9 years ago
Fixed in c70bc4dcaa7d except for preprocessor commands. 

I need some thoughts on how to color preprocessor commands as there are no free 
color schemes left among the ones, built into TESH. As for now the two possible 
options are:
a. Color preprocessor commands using some existing style
b. Color them using new style, but this style will be hard-coded to the DLL 
(you won't be able to modify it using TESH style dialog)

Original comment by vand...@lol-game.ru on 24 Aug 2011 at 9:23

GoogleCodeExporter commented 9 years ago
// functions types
lambda callback

This is not a types (tesh highlight it as types now). It must be highlighted 
like function keyword. Also don't upload to git *.dll, post it as HorusUpdate 
in download section.

> a. Color preprocessor commands using some existing style

#define instruction now highlighted as all instruction blocks (loop, if etc.) 
and I think it looks well. Also teoretically I may reverse TESH to add new 
color schemes...

Original comment by adi...@gmail.com on 25 Aug 2011 at 5:40

GoogleCodeExporter commented 9 years ago
> please make it possible to add my own keywords, i'm expecting to see 
additional sql file
+1

> Please submit a new request with your thoughts on improving the project.

Not sure if it's the right place to report, but there are a few problems with 
code folding. 

In TESH options, checkbox "Only fold functions and globals" doesn't work. It 
still folds libraries and structs even if it's checked...

I think folding libraries should be disabled by default, because it's quite 
natural to have one trigger for one library. No need to fold it apparently? :P

while (cond) -- endloop does not fold correctly, although syntactically correct.
Not much of a problem, since you can just use {} syntax.

I also think "save scroll position" can be greatly enhanced in long trggers 
with code folding. It should remember which funcs were unfolded and unfold them 
when you return to the trigger. That would be sooo handy.

Original comment by evgkoc...@gmail.com on 25 Aug 2011 at 7:15

GoogleCodeExporter commented 9 years ago
> Also don't upload to git *.dll, post it as HorusUpdate in download section.
This tesh.dll I need to keep under revision control as I don't have its sources 
and only edit the resource table.
I'll update the keywords today and push updated version as well as add it to 
download section.

> Also teoretically I may reverse TESH to add new color schemes...
I can add color definitions too, but they won't show in theme management 
dialog. I'll take a look at this later on.

> Not sure if it's the right place to report
It's not the right place :( I have created new issues with your concerns: Issue 
39, Issue 40

Original comment by vand...@lol-game.ru on 25 Aug 2011 at 8:39

GoogleCodeExporter commented 9 years ago
> but they won't show in theme management dialog.
Hack dialog creation, load custom dll and use new dialog?

Original comment by adi...@gmail.com on 25 Aug 2011 at 10:05

GoogleCodeExporter commented 9 years ago
> Hack dialog creation, load custom dll and use new dialog?
Hell of a work for no real profit. I'd better allow lexer dll to load styles 
file explicitly. 

If you want some reversing, you'd better reverse TESH attachment process so I 
can use this knowledge to write my own one :)

Original comment by vand...@lol-game.ru on 25 Aug 2011 at 10:09

GoogleCodeExporter commented 9 years ago
Added missing ones in 96952b9d2ff7.

Original comment by vand...@lol-game.ru on 26 Aug 2011 at 4:39

GoogleCodeExporter commented 9 years ago
You have forgotten "break" ^_^

Original comment by doctorge...@gmail.com on 27 Aug 2011 at 9:42

GoogleCodeExporter commented 9 years ago
It was not included in ADOLF's list ^^ Will be added with next update.

Original comment by vand...@lol-game.ru on 27 Aug 2011 at 10:05