Tool AdicHelper - A cJass parser

Everything that works in vJass, works in cJass.

The compiler chain is: World Editor -> AdicHelper -> JassHelper -> resulting war3map.j
 
Woops, I must just be retarded :(

Ran into a peculiar bug with cJass that I don't recall running into with vJass

JASS:
struct A{
    group immune
}

private group immune

void B(){
    A D = A.create()
    immune = D.immune
}


It tries to add the scope prefix onto D.immune, and then says it isn't a member of A.

Found another one:

JASS:
A bah = A.create()
struct A{
}


It doesn't recognize struct A if you declare the global above it.
 
New development version is out: 1.4.1.1


In this dev version we've implemented removal of unused functions from resulting map script. Example follows:
JASS:
void f_00 (int i) {}
void f_01 () {}

After saving the map with Optimizer turned on you won't find the [ljass]f_00[/ljass] function in the resulting map script. But if you modify the code:
JASS:
void f_00 (int i) {}
void f_01 () { f_00 (0) }

then both functions will remain in the map script. The first function was removed because it's considered optional (you won't execute it using Execute func because it takes arguments and there are no direct calls to it), [ljass]f_01[/ljass] could possibly be executed somewhere, so it won't be removed.


And now a question to users: we want some keyword to indicate functions without arguments that are not executed by ExecuteFunc and can be easily removed if not used elsewhere. We suggest optional:
JASS:
optional void fx () {}
 
All of these script optimizations shouldn't be done in cJass -_-

cJass should strictly just be a precompiler, use an optimizer for script optimizations.
 
This optimization is done only if "Enable AdicOptimizer" menu entry is checked. I hope ADOLF will move all other optimizations there too =)

And, btw, Vex's optimizer doesn't remove excessive code.
 
I like what you're doing. I think optimisations should be done at this level, personally.

I have a request. For this request, I think I'd throw out everything for cJass.
  1. Allow overriding the "destroy" method completely on structs (but allow that method to call the real "destroy").
  2. Allow multiple modules to write multiple onInit methods, and if possible, onAllocate and onDeallocate or something.
What do you think? :)

Edit: Don't worry, seems I finally contacted Vex. o_O
And it looks like he's willing to fix stuff.
 
For your optimizer, maybe make it create a report of all the functions that could be optimized, but have not (because of execfunc stuff)?
 
Ditto. But somehow, I've never had it when I used both AIDS and cJASS ;) So so far, it's not been a problem. But it would prove to be problematic if I did use AIDS and cJASS at the same time.
 
Or if the cJASS compiler had something like //! cjass and //! endcjass, which it ignores anything not in those tags.
 
Or perhaps a way you can mark a trigger to not parse? Like, if you could right click the trigger on the left pane, and click "Don't cJASS Parse" or something.
 
OR just have it ignore things in those tags. This way you only have to use it on a few systems that don't work if you are coding the whole map in cjass like I am :eek:
 
Well, with the tags, you'd have to scroll back and forth in the library and that can get tiring if it's a large one. (Or be smart and use the scroll bar...)

If you cold easily just right click the trigger object and click "Don't Parse" that'd be simpler. Not as simple to code, but simpler in the end result.
 
@Frozenhelfir:
The latest development version (1.4.1.20) compiles the latest version of AIDS without errors. You just need to update from development branch if you use stable version.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top