cyrusfirheir / twee3-language-tools

[ VSCode extension ] Syntax highlighting and programmatic language tools for Twee 3, and Twine 2 storyformats.
https://marketplace.visualstudio.com/items?itemName=cyrusfirheir.twee3-language-tools
MIT License
47 stars 16 forks source link

Checking if temporary variables are defined #45

Open SjoerdHekking opened 3 years ago

SjoerdHekking commented 3 years ago

Since temporary variables are locally used within the same passage or <<include "passage">> it might be useful to have a sanity check whether or not the temporary variable has been set. Consider the following code: <<set _tempVar to "python">> <<if _temp is "python">> Python is amazing! <</if>> Of course, this wouldn't play, but since these are used locally defined, T3LT could check against whether or not it exists. Since a safety net could've helped me spend an hour less on finding why my code didn't function as expected.

Yours sincerely, Sjoerd Hekking