dedmen / armascriptcompiler Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
When i define functions in CfgFunction and place *.sqfc file in the mission (instead .sqf) then arma generate error: "File not found". Game search ".sqf" files. I must to place empty *.sqf file with same names to avoid this error.
class myFSMFunction
{
ext = ".sqfc";
}
does not solving issue.
__has_include in SQF scripts cannot be reliably resolved at offline compile. These files should not be compiled
https://github.com/dedmen/ArmaScriptCompiler/blob/master/src/main.cpp#L54
root_path is drive letter root, works fine for p-drive, doesn't work fine for not p-drive
example, compile directory
O:\dev\CBA_A3
for O:\dev\CBA_A3\addons\xeh\test
The virtual path should be assembled from pboprefix, and relative path
iterate up directory structure till first pboprefix
x\cba\addons\xeh
pathRelative = path.lexically_relative(directory of pboprefix file);
->
pathRelative = /test
virtual path -> prefix/pathRelative -> x\cba\addons\xeh/test
ArmaScriptCompiler/src/scriptCompiler.cpp
Line 235 in df64320
If the value needs to be truncated to fit into a float, and there is a loss of precision, print a warning.
Instead of just
the "-" operator do a
the "-" operator if left side arg is type number and right side is also number
instead of matching possible optimizations only by what script command is used, also take argument type into account and implement seperate functions per argument type combinations
Feature request: Allow the defining of the .json file using the command line
Example:
ArmaScriptCompiler.exe --config ace.json
Situation
inputdir "C:/Users/testuser/Desktop/a3/Functions_F/"
OutputDir "C:/Users/testuser/Desktop/a3/Functions_F/"
result file C:/Users/testuser/Desktop/a3/Functions_F/User/testuser/Desktop/a3/Functions_F/initFunctions.sqf
Expected result file C:/Users/testuser/Desktop/a3/Functions_F/initFunctions.sqf
#if A3_DEBUG is used in Antistasi for defining log tracing. ASC seems to freak out any time that used. Can not confirm if it is all #if just this one.
scriptCompiler.txt
The problem seems to be with parsing something like this (which works fine in SQF):
#define X__ '
#define __X '
#define XX__ "
#define __XX "
e.g.
#define X__ '
#define __X '
#define XX__ "
#define __XX "
#define PICS_PATH(x) XX__##PREFIX\pictures\x.paa##__XX
#ifdef MISSION
#define PICTURE_PATH(x) getMissionPath(PICS_PATH(x))
#else
#define PICTURE_PATH(x) PICS_PATH(x)
#endif
PICTURE_PATH(blabla)
Output SQFC files filepath is written as /z/ace/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf
But thats wrong, Arma internal filepaths use backslash.
This could also be issue in SQF-VM, but can probably remedied by passing filepaths a different way.
Title
If I have 1e39 (infinity) as a constant in a script, ArmaScriptCompiler runs without errors but does not produce any output.
Since A3 2.06 deleteVehicleCrew supports just one parameter, the vehicle: deleteVehicleCrew vehicle
The script compiler parser doesn't support it and throws the following error message and the script is not compiled:
Parse Error: syntax error, unexpected OPERATOR_B_3, expecting } or ; or ","
Is there any reason why excludeList
have different path representation?
I think would be nice to have it consistent.
#pragma SQFC_NO_COMPILE
baermitumlaut [5:01 PM]
@dedmen another optimization idea: transform BOOL && BOOL to BOOL && CODE
dedmen [5:03 PM]
Yeah. Thought about that but wasn't sure if there might be any caveats that are complicated to solve maybe.
More specifically, I thought about adding a "lazy compare" script function/instruction. That you just give a array of code to.
That does real lazy eval. And not still evaluate all the other &&
's even though it's already false.
params ["_unit", "_pos", ["_target", objNull], ["_buildings", []]];
_buildings pushBack [1,2,3];
Compiles fine.
But after first run, assembly prints this
push ["_unit","_pos",["_target",<NULL-object>],["_buildings",[[1,2,3]]]]
callFunction params;
pushBack modified the reference inside the compiled script.
Need to insert +
operator call between the const array and params call, if the default values contain an array because otherwise the array will leak into the script.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.