EliotVU / UnrealScript-Language-Service

Bringing a work-in-progress intelliSense to ye olde UnrealScript :)
MIT License
48 stars 9 forks source link

[0.4.4] Closing unopened comment #28

Closed Xymanek closed 4 years ago

Xymanek commented 4 years ago
/**
 * Removes the values for all configurable properties in this object's class from the .ini file.
 *
 * @param   PropertyName        if specified, only this property's value will be removed.
 */
native static final function StaticClearConfig( optional string PropertyName );
*/

image

The UC compiler obviously considers this fine, so perhaps downgrade it to a suggestion or something?

midnight-dev commented 4 years ago

Does it really not care about an orphan tag? */ Granted, most of my UnrealScript experience is from 2006, but I thought the compiler was very temperamental about expected and unexpected tokens. To me, it looks like a syntax error.

Xymanek commented 4 years ago

While I agree that it shouldn't be legal, it works and it's from Src/Core/Classes/Object.uc

midnight-dev commented 4 years ago

Yikes. Never noticed that. Which version of Unreal / Unreal Tournament / Unreal Engine is that in? And if this were to be rated as a warning instead of a syntax error, would it help developers? It could be a pain to check if the syntax highlighter should care about orphan tokens like this every time */ is found. I'll see if I can find this issue in UT2004 UScript.

Xymanek commented 4 years ago

XCOM2: WOTC. So UE3 + some Firaxis additions (but this isn't marked/commented as one of them)

EliotVU commented 4 years ago

UE2 throws this error: "Error, Unexpected '*/' outside of comment" I think the best choice is to leave this as a valid error (maybe a warning?).

Xymanek commented 4 years ago

So, I also got Error, Unexpected '*/' outside of comment when I tried to repro it. However, upon further digging, it appears that UCC supports "nested comments" (or something???) since the following perfectly compiles:

/*
/**
 * asdfg
 */
*/