-
Notifications
You must be signed in to change notification settings - Fork 129
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
Support attributes in symbolic expressions #1369
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
36010fa
Support attributes in symbolic expressions
tbennun 0bbe5c4
Added subscript visitor method.
alexnick83 29b269b
Added test.
alexnick83 dcad52a
Updated Attr.free_symbols.
alexnick83 98386ad
Merge branch 'master' into sym-attr
alexnick83 59b8a0a
Restore returning symbols with dotted name.
alexnick83 a735a9f
When inferring the type of attributes, check for Structures and retur…
alexnick83 e34ca3c
Replace dots with arrows in for-loop code.
alexnick83 6490b2f
Fixed tests.
alexnick83 2eda9da
Replace dots only in the for-loop header.
alexnick83 74002ce
ForLoop now generates the init code by unparsing the init interstate …
alexnick83 927cb04
cpp.ptr replaces dots with arrows for structure data.
alexnick83 0001189
Defined/declared nested data now uses arrows instead of dots in their…
alexnick83 306d7a9
Removed commented out code.
alexnick83 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexnick83 what about plain structs (i.e., not pointers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have decided that Structures will always resolve to a pointer to a struct, I think it is better to not handle that case (now), since it might be something unrelated to nested data and cause further confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This assumption was valid for the time being, but I am now arguing to change that assumption. For cases where the type of an expression is being evaluated, where the
t.value
type of an Attribute expression is not merely a structure, but an array of structures (indexed through a Slice), the returnedinferred_type
is no longer a pointer but directly a plain struct.Example:
my_array_of_structs[i].my_attribute
Commit e2561ed implements a handle for this additional case.