Skip to content

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

Open
@Mwexim

Description

@Mwexim

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurePull request adding a new feature.futureLong-term plans of requests-for-comment about future/desired features.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions