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

Fix some issues with ExprParse #5878

Merged
merged 9 commits into from
Oct 20, 2023
Merged

Fix some issues with ExprParse #5878

merged 9 commits into from
Oct 20, 2023

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 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
5 checks passed
@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