Feature #22275

Colorize reserved words

Added by kju almost 4 years ago. Updated almost 4 years ago.

Status:Closed Start date:07/13/2011
Priority:Normal Due date:07/16/2011
Assignee:Amra % Done:

100%

Category:-
Target version:0.3 Estimated time:1.00 hour

Description

\b(?>and|array|assert|bool|breakOut|breakTo|call|case|catch|code|config|control|default|display|do|else|exec(?:EditorScript|FSM|VM)?+|exit(?:With)?+|false|float|for(?:Each(?:Member(?:Agent|Team)?+)?+)?+|from|goto|grp|if|int|obj|or|pos|private|public|select|set|spawn|step|string|switch|terminate|then|throw|to|true|try|unit|waitUntil|while|with)\b

Note: It contains some dummy variable defines, like

#define string
string _myName = "Tim";

picture001.jpg (177.5 kB) kju, 07/14/2011 09:50

Screenshot.png (99.4 kB) Amra, 07/16/2011 04:45

History

Updated by Amra almost 4 years ago

  • Assignee set to Amra
  • Target version set to Future versions

Do you mean reserved words in .cpp, .hpp files?

Updated by kju almost 4 years ago

For .sqf actually. :)

Right now true/assert etc you seem to define as the same time as SQF commands.
At least they have the same color - and a unique color for both groups would be useful.

Here is an example of my text editor coloring.
You will see the different coloring:
  • Black: keywords
  • Purple: SQF commands
  • Blue: strings
  • Green: local variables
  • Red: comments

Now i added to reserved keywords also my dummy variable type defines:

//----------------------- dummy annotations in code ---------------------------

//      code type           ArmA script type
#define bool                //boolean
#define code                //code
#define int                 //number
#define array               //array
#define float               //number
#define string              //string

// more advanced types
#define obj
#define pos
#define control
#define unit
#define grp
#define config
#define display

// access modifiers

// public denotes variable is to be sent via "publicVariable" command
#define public

Updated by Amra almost 4 years ago

Oh I see! That's definitely a good idea!

Updated by Amra almost 4 years ago

  • File Screenshot.png added
  • Due date set to 07/16/2011
  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Estimated time set to 1.00

Done

Updated by Amra almost 4 years ago

  • Target version changed from Future versions to 0.3

Also available in: Atom PDF