Language support for JASS, including grammar, pretty print, and validation, using Antlr
npm install wc3-jass
JASS
Ice Sickle language support for JASS, including grammar, pretty print, and validation
Why? ·
Language Overview ·
Contributing
function MyFunction takes unit u, region r returns boolean
... (statements)
return false
endfunction
call MyFunction(...)
`
Local variables
`
local unit u = null
set u = ...
`
Globals
`
globals
trigger t = null
region gg_my_region = ...
endglobals
`
Logical conditions
`
if life == 55 then
call Hello(7, 22)
elseif not udg_True then
call ok(myVar, 4, "hello")
elseif (true or true) and false then
call Strange("helloWorld", 54, false)
elseif udg_IsTriggerEnabled then
call ThisIsTrue(true)
else
call Yay()
endif
`
Loops
`
// This is the only type of loop in JASS
// There are no "for" or "while" loops
loop
set i = i - 1
call SetPlayerAbilityAvailable(Player(i), udg_SpellDamageAbility, false)
exitwhen i == 0
endloop
``