`??=` and return checks for functions


Additions:

  • Added a ??= operator.
    This should prove a more reasonable replacement for #args in GMS2.3.
  • Entering . out-of-context now shows the same completion as self. and erases the dot upon choosing a match.
    This allows to utilize the new completion features without increasing verbosity of your code.
    Should come handy for figuring out any problematic spots when updating to GMS2.3.1 (which has built-in functions with no return values to return undefined instead of 0).

Improvements

  • You can now open GMS2.3 notes in GMEdit.
  • Updated 2.3 function definitions to cover 2.3.1 additions.
  • You can now set a keyboard shortcut for reloading GMEdit.
  • namedArgument == undefined will now mark the argument as optional (and same for !=).
  • “Warn about trying to use result of a script/function with no returned values” now includes built-in functions with known lack of a returned value.
    (uses the dataset from GMLive so should be fairly accurate)

Fixes

  • Fixed GMS2.3.1 struct[$ key] accessor not being recognized by the linter.
  • Tab no longer unfocuses the search field in Global Lookup.
  • The project now reloads when changing GMS2.3 sorting order in Preferences.
  • Fixed freshly created 2.3 scripts not being remove-able via GMEdit.
  • Fixed function name() {} inside object events confusing the syntax highlighter.
  • Fixed @interface always using script name in pre-2.3.
  • Fixed a=1b=2 (number+identifier without delimiter) not highlighting right.

Other

I pushed a release with everything but function return value checks and ??= operator to the stable branch.

There is this tendency where I don’t push a build to stable branch because I just added something new, but, let’s be honest, I’m always adding something new.

Files

GMEdit-Windows.zip 76 MB
Version Dec 7, 2020 Dec 07, 2020
GMEdit-Mac.zip 90 MB
Version Dec 7, 2020 Dec 07, 2020
GMEdit-Linux.zip 92 MB
Version Dec 7, 2020 Dec 07, 2020
GMEdit-App-Only.zip 11 MB
Version Dec 7, 2020 Dec 07, 2020
GMEdit-Beta-Windows.zip 98 MB
Version Dec 7, 2020 Dec 07, 2020
GMEdit-Beta-Mac.zip 90 MB
Version Dec 7, 2020 Dec 07, 2020
GMEdit-Beta-Linux.zip 92 MB
Version Dec 7, 2020 Dec 07, 2020
GMEdit-Beta-App-Only.zip 11 MB
Version Dec 7, 2020 Dec 07, 2020

Get GMEdit

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Oh nice, it automatically turns if (value == undefined) value = something statements into a null coalescence. This is going to save me quite a bit of typing.

Indeed! It will auto-collapse any if (a == undefined) a = pattern so long as it has consistent spacing, so

if(value==undefined)value=something
if(value==undefined)value= something
if (value == undefined) value = something
if  (value  ==  undefined)  value  = something

are all valid.