Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

PJass updates

Discussion in 'Warcraft Editing Tools' started by LeP, Oct 25, 2014.

  1. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    Thanks for testing. Indeed the fix is very easy but it's not pjass' domain to do so.
    Here is a fresh pjass version which reports this.

    Code (Text):

    $ cat tests/should-fail/native-as-code.j
    native TriggerSyncStart takes nothing returns nothing

    function foo takes nothing returns nothing
        local code bla = function TriggerSyncStart
    endfunction

    $ ./pjass tests/should-fail/native-as-code.j
    tests/should-fail/native-as-code.j:4: Cannot use native 'TriggerSyncStart' as code
    tests/should-fail/native-as-code.j failed with 1 error
    Parse failed: 1 error total

     
     

    Attached Files:

  2. Aniki

    Aniki

    Joined:
    Nov 7, 2014
    Messages:
    564
    Resources:
    6
    Tools:
    1
    Maps:
    1
    Spells:
    1
    JASS:
    3
    Resources:
    6
    More nit-picking:

    Hex literals using the '0X' prefix are not recognized:
    Code (vJASS):

    globals
        integer a1 = 0x0
        integer a2 = 0X0 // error
    endglobals
     


    Variable shadowing interacting with constant function:
    Code (vJASS):

    globals
        integer x
    endglobals
    constant function foo takes nothing returns nothing
        local integer x
        set x = 5 // Assignment to global variable x in constant function
    endfunction
     
     
  3. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    Cheers m8 keep 'em coming.
     

    Attached Files: