• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Jass tag syntax highlighting (more like an update than a bug, but meh)

Status
Not open for further replies.
Level 40
Joined
Dec 14, 2005
Messages
10,532
The following should be highlighted with the style ideally the same as that of the word after the dash.

JASS:
"hi//"
       - "hi" //comments shouldn't occur in strings
5 - 'h000' //numbers
0x5 - 'h000' //hex numbers
$5 - 'h000' //hex numbers
0.5 - 'h000' //decimal numbers
this - true
super - true
thistype - unit
$a$ - method //textmacro variables
module - method
endmodule - method
optional - method
implement - method
delegate - method
stub - method
onDestroy - method
onInit - method
type - method
array - method
$ - [
Textmacro variables:

\$[a-zA-Z_]\w*\$

Numbers (all types):

\-?((0x|\$)[\da-fA-F]+|\d+\.?\d*|\.\d+|'([^']|[^']{4})')


--

Also, could we get a maximum height on Jass tags (fairly short) after which they scroll?
 
Last edited by a moderator:
Level 15
Joined
Nov 1, 2004
Messages
1,058
Those are not part of the standard Jass grammar. I'm sure they must be part of some extension (vJass?) though, otherwise you wouldn't be bringing them up.
 
Level 14
Joined
Nov 18, 2007
Messages
816
JASS:
constant
native
function
takes
returns
endfunction
if
then
else
elseif
endif
loop
endloop
exitwhen
struct
endstruct
method
endmethod
interface
endinterface
globals
endglobals
library
endlibrary
scope
endscope
private
public
requires
initializer
uses
needs
static
call
set
local
return
and
or
not
debug
type
extends
keyword
delegate
readonly
stub
defaults
onDestroy
onInit
module
endmodule
implement
optional
array

JASS:
ability
aidifficulty
alliancetype
attacktype
blendmode
boolean
boolexpr
buff
button
camerafield
camerasetup
code
conditionfunc
damagetype
defeatcondition
destructable
dialog
dialogevent
effect
effecttype
event
eventid
fgamestate
filterfunc
fogmodifier
fogstate
force
gamecache
gamedifficulty
gameevent
gamespeed
gamestate
gametype
group
handle
igamestate
image
integer
item
itempool
itemtype
leaderboard
lightning
limitop
location
mapcontrol
mapdensity
mapflag
mapsetting
mapvisibility
multiboard
multiboarditem
nothing
pathingtype
placement
player
playercolor
playerevent
playergameresult
playerscore
playerslotstate
playerstate
playerunitevent
quest
questitem
race
racepreference
raritycontrol
real
rect
region
sound
soundtype
startlocprio
string
terraindeformation
texmapflags
texttag
thistype
timer
timerdialog
trackable
trigger
triggeraction
triggercondition
ubersplat
unit
unitevent
unitpool
unitstate
unittype
version
volumegroup
weapontype
weathereffect
widget
widgetevent

JASS:
false
null
super
this
true

dont forget support for $

oh yeah, could you put Jass code into a frame of variable width (based on the parents width) and fixed height with {overflow: scroll;}? Would make browsing Jass code much more convenient.
 
Last edited:
Level 14
Joined
Nov 18, 2007
Messages
816
highlighting wise, yes.

other than that:
oh yeah, could you put Jass code into a frame of variable width (based on the parents width) and fixed height with {overflow: scroll;}? Would make browsing Jass code much more convenient.
I'd like to highlight that one again, as i think that would make sharing Jass code a whole lot easier.
 
Status
Not open for further replies.
Top