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

[UI] Fix highlighting of return command and list accesses #4859

Merged
merged 8 commits into from
Dec 8, 2023

Conversation

jpelay
Copy link
Member

@jpelay jpelay commented Dec 5, 2023

Description

  • Fixes the incorrect name that was used to get the return value from the highlighting json
  • Adds the Int and Number rule to ListAccess when appropriate. Functionally this does nothing since they were still being highlighted, but now the trees we generate don't have any error nodes.
  • Allows use of list accesses on left hand side of assignments
  • Fixes the highlighting of EqualityChecks using = on level 12 onward

Fixes #4857 and fixes #4856 and fixes #4854

How to test

Go to level 12 and write this program:

define sum with n1, n2
    return n1 + n2

Check that return is being highlighted as a keyword

Now go to level 16 and type:

print l at [1]

The closing bracket should be highlighted

Go to level 12 and type:

list at number = 1

On this same level type:

if name = 'Hedy the Robot'
    print 'Hi there!'

The = should be highlighted
The variables and the at should be highlighted

@jpelay jpelay requested a review from Felienne December 7, 2023 14:20
Copy link
Member

@Felienne Felienne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works!

image image image

Copy link
Contributor

mergify bot commented Dec 8, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit fc9c71b into hedyorg:main Dec 8, 2023
Copy link
Contributor

mergify bot commented Dec 8, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants