Skip to content

Add the of expression #120

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add the of expression #120

wants to merge 3 commits into from

Conversation

Gilbert189
Copy link

This PR adds the of expression, representing the ([property v] of [something v]) sensing reporter. This allows other sprites to read (but not write) private variables of another sprite, along with some other attributes like direction and costume names.

Here's how one would use this:

# foo.gs
var something = "123";
# bar.gs
onflag {
    say something of foo; # says 123
}

Things like verifying names and documentation is yet to be implemented.

@FAReTek1
Copy link

FAReTek1 commented Apr 6, 2025

there was an existing idea for a different syntax that would allow for this and be able to be used in other contexts too, using the @ symbol. however it would not be used for accessing variables. maybe this is an alternative, idk

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

Successfully merging this pull request may close these issues.

2 participants