kayler-renslow / arma-intellij-plugin

A plugin for Intellij IDEA that allows for syntactical analysis, code inspections, and other nifty features for the SQF scripting language in Arma 3.
MIT License
41 stars 10 forks source link

Macros support #50

Closed diraven closed 6 years ago

diraven commented 7 years ago

Plugin Version

1.0.9

Summary

https://community.bistudio.com/wiki/PreProcessor_Commands#Arguments

Syntax support would be nice for defined macros.

Detail

For example: script_macros.hpp:

#define GVAR getVariable

And script.sqf

#include "script_macros.hpp"
_vehData = _x GVAR ["vehicle_info_owners",[]];      

will produce syntax error.

Ragebone commented 7 years ago

To be honest, i really dislike the way AL uses macros for shortening commands, and i can't see a use in that except pure laziness and planed annoyance.

As far as i can remember, macros are currently handled as global-variables and not as its own thing except some exceptions. There fore, until Macros are implemented properly as its own thing you will have that problem. _vehData = GVAR(_x,"vehicle_info_owners",[]); would work flawless.

diraven commented 7 years ago

Fair enough.