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

Defines not proprocessed in sqf files? #33

Open kju opened 7 years ago

kju commented 7 years ago

define array //array

array saas_basecache = []; //This variable is uninitialized.

Ragebone commented 7 years ago

sorry, overlooked in like 10 runs that it didn't work, damn unit-testing where you are only able to look at the log. Piece of Shi* Arma.

+1 for the original issue.

Considering that i failed implementing JCPP for basically the same use case, huge respect to Kayler if he manages this.

kayler-renslow commented 7 years ago

I'm confused at what you are doing. You are creating a macro "array" but not setting it to anything. Then, you are doing this: array saas_basecache = [];.

kju commented 7 years ago

its "weak" type definition - to make code reading easier/faster to see what type a variable is

kayler-renslow commented 7 years ago

so is array converted into whitespace after preprocessing?

kju commented 7 years ago

yep. its a blank replacement preprocess first removes all comments, then applies the defines/macros in this case the word will be replaced by nothing - aka the word removed

kayler-renslow commented 7 years ago

that's interesting...