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

State #123

Open
xanatos opened this issue Aug 31, 2019 · 0 comments
Open

State #123

xanatos opened this issue Aug 31, 2019 · 0 comments
Assignees
Milestone

Comments

@xanatos
Copy link

xanatos commented Aug 31, 2019

I'm using

#{ state[someSymbolName] = someValue; }

to memorize new symbols (for example name of new local variables I encounter while parsing). Not sure if this is the "right" way to do it.

I have two problems: it would be efficient to have a

IReadOnlyDictionary<string, object> GetState() => state;

method for helping debugging (at this time I'm using a little reflection to extract the Dictionary), and I think that there should be a RemoveFromState() method in Cursor (or in the this[] setter, if value == null then remove the key instead of setting it to null... The this getter isn't able to distinguish between key not existant and key with value null)

@otac0n otac0n self-assigned this Mar 14, 2020
@otac0n otac0n added this to the 4.2 milestone Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants