Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.1.x] Syntax that needs to be implemented #40

Open
36 of 37 tasks
Mwexim opened this issue Aug 22, 2020 · 2 comments
Open
36 of 37 tasks

[0.1.x] Syntax that needs to be implemented #40

Mwexim opened this issue Aug 22, 2020 · 2 comments
Labels
feature Pull request adding a new feature. future Long-term plans of requests-for-comment about future/desired features.

Comments

@Mwexim
Copy link
Owner

Mwexim commented Aug 22, 2020

I am creating this list for others to see which syntax should be implemented but isn't already. This is the syntax that's present in vanilla Skript, but not yet in the skript-parser project. All Minecraft-related syntax is obviously skipped.
Furthermore, I added a section for syntax that is not available in vanilla Skript, but could be useful to have in this project. All those syntaxes are subject-to-change and open for debate.
If you want to implement any of these syntaxes, just fork the project and make a pull request. You should always look at how Skript implements the given syntax, and then adapt it to this project. Note that almost every syntax in vanilla Skript is very old and unoptimised and that with the fantastic tools this project gives you, you can easily simplify the implementation.

Vanilla syntax

General

  • Line break expression (currently not necessary)
  • Script name expression (not high priority)
  • Shutdown effect
  • Filter expression
  • Map expression (map a function on a list of objects)
  • Loop N times section (just add this to current SecLoop file)

Dates

  • Formatted time expression
  • Time since expression -> duration since a given date

Strings

  • Hashed string expression
  • String is empty condition
  • Number of characters expression -> number of upper-/lowercase characters, see here
  • Replace all effect + expression (leave this one open please, updated one from 2.5 preferably)
  • Subtext expression

Lists

  • Indices of list expression -> see here
  • Reversed list, shuffled list, sorted list expressions
  • N random elements out of list expression (just add this to current ExprElement file)

New syntax

General

  • When something event
  • Escape effects (from SkQuery)
  • Wait while (from MundoSK, just add this to current EffWait file)

Classes

  • This would make the parse as expression possible
  • Class type (or Type<?> is also possible)
  • Parse as expression

Time

  • Time is basically the time in hours and minutes, like HH::mm (for example 16:34h or 11:13 PM)
  • Time type
  • Date to time converter
  • At time event

Strings

  • Character at index expression (from SkQuery)

Numbers

  • Is divisible and is prime conditions (from SkQuery)
  • Nth prime expression (from SkQuery, no priority)
  • Number conversion to roman numbers, hex, binary and others expressions

Future syntax

All the syntax below has no priority and should not be implemented unless the majority of above-defined syntaxes have been implemented. Discussion about these syntaxes below is appreciated and suggestions are welcome.

General

  • Switch/case sections (not certain)

Colors

  • Currently being worked on, so try to implement other syntaxes first.
  • Color support and parsing as HEX and default colours (like red, blue, yellow, green, ...)
  • Color support in strings (like "Normal <blue>Blue!. This would need some changes to how strings are parsed, but I have some ideas for this)
  • Hex to RGB and vice-versa expressions
  • RGB creation expression (I don't want parsing for this, just an expression)

Regex

  • Match condition
  • Regex replace, split, join and others expressions

Queue

  • Queues should not be a separate type, but rather a utility used with lists
  • Peak/Poll expressions/effects
  • Offer effect

If you have any suggestions or requests for changes, just leave a comment and I'll update this list as soon as possible. Everything, except the Vanilla syntax section, is very subject-to-change.
I hope this makes the current missing syntax elements clear as I wanted to list them here in favour of the recent road map that was created. This road map stated that it wanted to add all the missing syntax from Skript to this project in two months. We won't make the deadline (which is not a big deal), but at least new developers and contributors know how they can help this project out!

@Syst3ms Syst3ms added the feature Pull request adding a new feature. label Aug 22, 2020
@Mwexim Mwexim changed the title Syntax that needs to be implemented [0.1.x] Syntax that needs to be implemented Aug 27, 2020
@Syst3ms Syst3ms added the future Long-term plans of requests-for-comment about future/desired features. label Aug 28, 2020
@Syst3ms Syst3ms pinned this issue Aug 28, 2020
@Anarchick
Copy link

Adding :

@Mwexim
Copy link
Owner Author

Mwexim commented Sep 1, 2020

Adding :

  • read condition as expression from skQuery (broadcast "%check [player is alive]%" # broadcast boolean)

Already added! Check the whether %=boolean% expression (ExprWhether)

Already added as well in the default ExprElement file (currently in a PR but it will be merged soon).

  • Full vector support + some vector expression from BioSphere (vector reflection for exemple) #Vector2 Vector3 and Vector4

Don't know about this. Vectors currently have no purpose since there is no connection with Minecraft (yet). I don't think this is necessary until we use integration with vector support.

  • Strings > reverse + caseText

Reversed strings are already supported, what do you mean with case text exactly? Take a look at ExprStringCases.

Can be useful, will consider.

  • Event at time (based on real time, support GMT and other)

Already added to the list!

  • UnixTime

Currently supported as well.

  • Monitoring expression (RAM/CPU/UPtime/ping/ip of server) # not priority

IP of server would be pretty redundant currently as we don't use anything IP-related. The other expressions can be useful indeed.

Welcome to the project. I love your enthusiasm, but maybe try to look inside the project first before proposing. I don't blame you though, since everything is currently not documented, so it's hard to see if something was added or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull request adding a new feature. future Long-term plans of requests-for-comment about future/desired features.
Projects
None yet
Development

No branches or pull requests

3 participants