BowlerHatLLC / vscode-as3mxml

ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
https://as3mxml.com/
Apache License 2.0
257 stars 39 forks source link

Support for new AIR 50 SDK AS3 language features #633

Closed esidegallery closed 1 year ago

esidegallery commented 2 years ago

The new AIR 50 Beta SDK introduces support for null-conditional operators, nullish coalescing and verbatim strings, outlined here https://github.com/airsdk/Adobe-Runtime-Support/discussions/1699#discussioncomment-3653584 😁

joshtynjala commented 2 years ago

Someone will need to implement these new language features in the Royale compiler before they can be supported in vscode-as3mxml.

esidegallery commented 2 years ago

OK, I've just created the issue over there: https://github.com/apache/royale-compiler/issues/219#issue-1374761667

shaucky commented 5 months ago

Excuse me, i think the current version still does not support verbatim string delimiters.

For example: @"i am a "verbatim string"".

joshtynjala commented 5 months ago

@shaucky The compiler in AIR SDK 50.2 does not consider your string to be valid.

Syntax error: Expected PAREN_CLOSE but got 'verbatim'

I don't think that a verbatim string can contain a " character because " is used to indicate the end of the string.

shaucky commented 5 months ago

Sorry, i mixed up the feature of literal strings and provided an inappropriate example…

Literal strings ignore all escape characters and interpret them as regular backslashes. Currently, the code shader still performs special coloring on escape characters within literal strings.

And this is a suitable example that can be compiled: trace(@"i am a verbatim string\r\n");.

The main affect here is when a literal string ends with a backslash, the coloring will assume that the string is still after it.