Skip to content

Conversation

UnderscoreTud
Copy link
Member

Description

This PR fixes a couple issues with ExprParse:

  • Previously, you could obtain an array object when parsing text with a plural type. For example, broadcast "1, 2" parsed as "%ints%" # broadcasts [1, 2]. Now, it flattens the array if you're not setting a list to the expression.
  • Previously, you could encounter an UnparsedLiteral exception if you tried to parse text as %object%. I fixed it by checking whether the types used have a parser or not. If one of them doesn't, it errors.

Additionally, this PR introduces a new ParseContext used specifically for this expression, called PARSE.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@AyhamAl-Ali AyhamAl-Ali added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Aug 4, 2023
@Moderocky Moderocky force-pushed the master branch 3 times, most recently from bd134d0 to 3f08853 Compare September 16, 2023 16:59
@Moderocky Moderocky changed the base branch from master to dev/feature September 17, 2023 08:00
@Moderocky Moderocky merged commit db1dad7 into dev/feature Oct 20, 2023
@Moderocky Moderocky deleted the fix/expr-parse branch October 20, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants