KoffeinFlummi / armake2

Successor to armake written in Rust
GNU General Public License v2.0
49 stars 17 forks source link

Support `__EVAL` #23

Open bovine3dom opened 5 years ago

bovine3dom commented 5 years ago

commy2 claims that you don't want to reimplement SQF and so don't support __EVAL, which sounds reasonable.

Could you throw an error if armake2 encounters such an expression? It currently just suggests quoting it, which is misleading.

Would you be willing to offer an __ARMAKEVAL that used e.g https://github.com/rekka/meval-rs? In our projects we mostly just use it for little bits of maths. baermitumlaut pointed out that one can just remove the __EVAL and ArmA will magically do the maths anyway for my use-case.

jonpas commented 5 years ago

This can be resolved by letting Arma evaluate __EVAL expressions on load, that is accomplished by storing the string and marking it as "expression" (value sub-type 4) in binarized config (add here) and in turn editing the parser to read __EVAL correctly and pass required data along.

Simple things should still be evaluated during binarization if possible, to speed up load times (simple math expressions and other things not using SQF).

Source: @dedmen