Open bryanhughes opened 9 years ago
This requires macro expansion pass before source is parsed.
I have similar problem. Code in Erlang/OTP source tests which looks like this:
?line P2 = spawn(timer, sleep, [1]),
where ?line macro is a legal sequence of tokens but is an illegal expression which also makes the source line where ?line is used an illegal expression, but they compile without errors when macro is expanded.
-define(line, io:format("something"),).
note the trailing comma.
Currently, if an variable is used in a macro, but no where else in the code block, it is marked as an unused variable. Would be nice if either 1) it is able to expand the macro or 2) we can disable the warning like you can do when using other languages like Java.
Here is some example code:
Currently, APIKey in the function is marked as an unused variable resulting in the module never being able to become green.