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

Implement simple form of associative arrays #465

Merged
merged 1 commit into from Jul 25, 2017

Conversation

bblancha
Copy link
Contributor

@bblancha bblancha commented Jul 25, 2017

Problem: No map-like data structures yet exist in ion.

Solution: Allow simple associative arrays with string keys

Changes introduced by this pull request:

  • Create hashmap context in shell::variables to store named hashmaps
  • Create "Key" selector to represent string keys
  • Instances of "Select" objects must now be cloned; remove Copy trait
    (This was needed to support a select type based on string keys)

Drawbacks: Select objects no longer implement Copy

TODOs: Does not yet have an initializer syntax for associative arrays

Fixes: Addresses #246

State: Needs review

Allow assignment to associative arrays by string key

Expand individual values from associative array using array operator
and square brackets

Addresses #246
@mmstick
Copy link
Contributor

mmstick commented Jul 25, 2017

Thanks!

@mmstick mmstick merged commit f7a560d into redox-os:master Jul 25, 2017
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