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

Improved indexing #103

Merged
merged 5 commits into from
Feb 1, 2019
Merged

Improved indexing #103

merged 5 commits into from
Feb 1, 2019

Conversation

btnlq
Copy link
Contributor

@btnlq btnlq commented Jan 18, 2019

  • Support array element assignment
  • Support indexing of multi-dimensional arrays
  • Support indexer assignment

Partially resolve #39

@davideicardi
Copy link
Member

Thanks @btnlq !
Why it is only partially solved? What is missing?

@btnlq
Copy link
Contributor Author

btnlq commented Jan 22, 2019

Issue #39 describes three unrelated problems:

  1. Variable assignment (GitHub_Issue_39_Simple_Reassignment from here)
  2. Array element assignment (GitHub_Issue_39_Array_Reassignment)
  3. Indexer assignment (GitHub_Issue_39_List_Reassignment)

This pull request solves the second problem. Later I will try to deal with the third problem.

@btnlq btnlq changed the title Add support to array element assignment Improved array indexing Jan 26, 2019
@btnlq btnlq changed the title Improved array indexing Improved indexing Jan 28, 2019
@davideicardi davideicardi added this to the vNext milestone Jan 29, 2019
@btnlq
Copy link
Contributor Author

btnlq commented Jan 30, 2019

@davideicardi, done!

I fixed the third problem (support for indexer assignment). I also added support for multidimensional arrays.

@davideicardi
Copy link
Member

davideicardi commented Jan 31, 2019

Great pull request! Very good work.

Just a quick question, do you think that the AssignmentOperators is always respected also inside these new workflow? I think it is important for security reason. In some context you don't want to allow expressions that modify data ... Eventually we can ensure this by adding a specific unit test?

@btnlq
Copy link
Contributor Author

btnlq commented Feb 1, 2019

AssignmentOperators is checked immediately when token '=' is detected. My changes did not break this behavior. But it’s impossible to prevent objects from being modified using methods like Dictionary.Add or List.Sort.

@davideicardi davideicardi merged commit 058d6d6 into dynamicexpresso:master Feb 1, 2019
@davideicardi
Copy link
Member

Just merged, v2.3.0 Thanks again!

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

Successfully merging this pull request may close these issues.

Indexed property setter not working
2 participants