View Single Post
Old 10-14-2006, 04:02 AM   #1
Free Software Terrorist
Vexorian's Avatar

Technical Director
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default JassHelper 0.A.2.B - A vJass and Zinc 2 Jass compiler

For an actual explanation of the additions and how they work well... ... You can check the readme online which explains all the things.

A quick intro: A proof of concept vJass compiler, vJass is an extension to the Jass syntax enabling a bunch of crazy things like libraries, structs and textmacros. Also adds the zinc scripting language, which is just a tweak of vJass with some small additions/more restrictions and syntax that is a little less verbose: check the zinc readme for more info.


* Fixed a bug with static ifs that made them fail when the constant boolean variable had a comment in its declaration line.
* It is now possible to use . syntax inside a global/static member declaration. However, you must notice that this will not usually work unless you are calling a static member from a place bellow its declaraton . Else you would get a Pjass error.
* Array structs no longer 'declare' unusable allocate/deallocate methods. In other words, you may now use those method names when declaring a method inside an array struct.

* Fixed a bug that allowed scope members to have invalid names and still compile.
* Manual: Fixed the getFromKey example.
* Zinc: Fixed bugs that prevented some real literals to compile.
* Zinc: while(true) does not add a useless exitwhen(false).
* Zinc: Added do{..}while(..) .

* All module initializers run before any struct initializer.
* Fixed a bug that forbade comments after then in static ifs.
* Structname.methodName.exists should work outside static ifs.
* Static ifs should now work correctly with members/methods that are explicitly public or private. Note that private members/methods will not be visible to static ifs outside the struct.
* Zinc: Fixed random compile error bugs introduced in last version.

* double import check now considers full path instead of just file name.
* static ifs can check if a method exists using .exists.
* private module destroy now works like module create (is not hidden from the implementing struct)
* Zinc: structs onInit and library onInit no longer conflict.

* Added "comment" import mode.
* Added +=,/=,-=,/=, and for(assignment; condition; assignment) to Zinc.
* Fixed a bug with import doing a double import when given the same filename twice in OSes that use / instead of \
* Fixed a crash when attempting to use special methods like allocate for function interfaces, now it gives a syntax error...
* Fixed a bug with function literals not working correctly when the function returned a custom type.
* Fixed a bug with function interfaces not working correctly when they had themselves as argument/return value.
* Fixed a bug with //! import inside //! zinc tags
* Unclosed //! zinc tags inside a file will get reported.

* externalblock now allows a $FILENAME$ argument and a extension= property.
* Fixed a bug that made /* */ comments mess up with the syntax error line number in the zinc/libraries phase when import was not used.
* Improved the library requirements error message.
* Zinc: Make [implement] cause syntax errors.

* Limit of strings in a single line raised from 27 to 61.
* Zinc: Fix not being able to parse certain real literals.

* Fixed a bug that allowed .getType() to cause jasshelper crashes.
* thistype works in static ifs. (not implicit though)
* When debug mode is on, static if phase will comment out lines instead of deleting them.
* Fixed a bug with optional requirements sometimes not working correctly.
* Zinc: jasshelper.conf's [noimplicitthis] option does not affect Zinc code.
* Fixed a bug with the shadow helper phase duplicating some comments.

* Fixed a bug that made .exists cause obscure syntax errors.

* Fixed a bug that prevented using .evalaute/ .execute on methods.
* Fixed a bug that caused syntax errors when you used a hook for a native that takes nothing.

* .pointer has been removed from the syntax for using methods for function interfaces.
* You may now also use non-static methods for function interfaces (they are treated as functions that take an extra integer first)
* Zinc: Added anonymous methods.

* Fixed some struct member declaration syntax errors appearing in line 1.
* Fixed a bug that made return wrong values when using the method implicitely (without this).
* Fixed missing syntax error messages in the structs phase.
* Static Methods can be used as function pointers. Just do struct.method.pointer to get such function pointer. Implicit casting between methods and function interfaces will come later (so you do not have to use .pointer).

* Fixed some undefined code related to implicit this in member usage. Which could have caused very odd code to get generated.
* Fixed an old bug that sometimes added indentation and comments to syntax errors.
* Zinc: Fixed a random crash related to comments.
* Zinc: Fixed a lame mistake that made all of a zinc struct's members LIBRARY-private.

* . or this. are not required anymore to use members. Note that this may cause issues if for some (incredibly weird) reason you try to use global variables from a method of a struct that has variables of the same name. To disable this feature, you can add [noimplicitthis] to jasshelper.conf.
* Improved the syntax error when you place a function inside a struct.
* Code values might get implicitly casted to boolexpr in some occasions, specifically, when using them as arguments for natives/bjfunc that take boolexpr. More cases will get added when type safety gets on its way for more stuff...
* Zinc: Added anonymous functions, but they cannot use locals from their parent (yet).
* Zinc: Fixed a crash that could happen when the zinc input is much smaller than the vJass output.
* Zinc: Fixed a couple of missing ; mistakes in the examples.

-- find complete changelog at readme --

The files

Click image for larger version

Name:	jasshelper48.png
Views:	131683
Size:	873 Bytes
ID:	360230.A.2.B.jasshelper.7z : Includes jasshelper.exe a command line utility that is supported by grimoire and that you can also use to manually compile your map. Also clijasshelper.exe that behaves exactly the same except it is intended for console usage.

Bug reporting /suggestion rule #1 Oct 09, 2009, 22:00 GMT
Please use vJass or zinc code for your suggestions and bug reports. Because it is confusing and if I have to learn a new language every time a person makes a post it would really suck. If you do not use either Zinc or vJass in your report, I'll not only ignore it, I will delete it. There is an exception though and it is when posting code in another language to explain a feature I should copy.

Rule #2 Nov 13th, 2009.
Report bugs in this thread, expecting me to go through links to other threads / and specifically other sites to be able to reproduce the bug is not going to be tolerated anymore.

Rule #3 Nov 21th, 209.
The easier you make to me to reproduce a bug, the more likely it will get fixed. Since I do not use NewGen Pack, sending me inputwar3map.j besides the map will seriously help a lot.

Just in case
When installing a new jasshelper version in newgen pack, replace jasshelper.exe and clijasshelper.exe in the folder called "bin" inside jass newgen pack's folder.
Attached Files
File Type: 7z 0.A.2.B.jasshelper.7z (668.5 KB, 14331 views)
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Sponsored Links - Login to hide this ad!