Jump to content

[BUG-233259] Proposal for Simple Script Pre-Processor


primerib1
 Share

You are about to reply to a thread that has been inactive for 456 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So I made yet-another-ticket:

 

Simple Script Pre-Processor

Submitted as BUG-233259.

Basically requesting the implementation of a simple script pre-processor in SLV, which will certainly be picked up by TPVs.

Nothing as complex as Firestorm's pre-processor, just the implementation of these three:

  • #define
  • #undef
  • #ifdef ... #else ... #endif

In other words, the main aim is to establish a baseline pre-processor functionality that can be uniformly found on all viewers.

This will hopefully lead to better code everywhere.

For details on my justification etc, please refer to the BUG.

As always, feel free to comment on the proposal 😊

Edited by primerib1
  • Thanks 1
Link to comment
Share on other sites

My wishlist is miles long, so I'll just say I'd be happy to have this.

This addition would not be compatible with Firestorm even if you only used these features in both viewers, due to Firestorm requiring the unaltered script to exist in a block comment with a specific format.

So either LL comes up with a new scheme of storing both scripts in the source code, or they follow what FS does, or (I'd hope) it's all magic'd away server-side by the compiler, so that only the unaltered code exists in the source.

Edited by Wulfie Reanimator
  • Like 1
Link to comment
Share on other sites

35 minutes ago, Wulfie Reanimator said:

So either LL comes up with a new scheme of storing both scripts in the source code, or they follow what FS does, or (I'd hope) it's all magic'd away server-side by the compiler, so that only the unaltered code exists in the source.

Hm, I think I wasn't being specific enough in the proposal... my bad.

I personally wish it's all done in the back-end, the compilers, rather than in the front-end. Though that might cause some complications with compiler error reporting as what the compiler 'sees' will no longer be exactly the same as what the front-end has.

But I'll let LL iron out the details 😄

Link to comment
Share on other sites

3 hours ago, primerib1 said:

Hm, I think I wasn't being specific enough in the proposal... my bad.

I personally wish it's all done in the back-end, the compilers, rather than in the front-end. Though that might cause some complications with compiler error reporting as what the compiler 'sees' will no longer be exactly the same as what the front-end has.

But I'll let LL iron out the details 😄

Error reporting shouldn't be a problem if preprocessing is done by the compiler/server, at least it isn't in any other language (such as C++ whose preprocessor is used extremely extensively in viewer development).

It is a problem in the FS version, since the compiler of course only knows about the processed script (since it's done by the viewer). The errors given will match the lines of the processed script which you will be able to check regardless.

Edited by Wulfie Reanimator
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 456 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...