Parse mark improvements #4177
-
Currently, the parse marks require the One other issue with parse marks, is that they can be difficult to use. This could be solved by changing parse marks into parse tags: strings, not integers.
This system could easily be made backwards compatible for parse marks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I think this idea would be a great improvement to the current system. What do you think about making this only available for colons? If we were to switch over to then completely, it would help with that (in getting devs to switch over). It would also make it simple to handle backwards compatibility, as you wouldn't have to worry about potentially parsing differently. ParseResult#mark could maybe be deprecated too and have a comment detailing/linking to the new system. |
Beta Was this translation helpful? Give feedback.
-
I concur, and I especially like the usage of strings instead of integers as parse marks. Perhaps you can even do something like:
|
Beta Was this translation helpful? Give feedback.
-
For the record, I have made a pull request over at skript-parser which adds this functionality, but preserves the integer parse marks by having a utility method that parses all numerical values. This is probably a way that still comforts Skript's need to support addons. |
Beta Was this translation helpful? Give feedback.
-
I've implemented this in #4176, and explained some stuff here: #4176 (comment) |
Beta Was this translation helpful? Give feedback.
I've implemented this in #4176, and explained some stuff here: #4176 (comment)
If anything else should be added to this, lmk