Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CSEC: Prefix/Postfix Expressions
This PR aims to implement prefix/postfix expressions for a restricted subset of possible lvalues for the CSEC machine.
The CSEC machine presently does not have any implementation available for any prefix/postfix expression kind.
Lvalues
Common lvalues (read: may not be an exhaustive list) in Java include:
This PR only targets prefix/postfix expressions for variable names. The other lvalue types are not in scope for this PR.
Prefix Expression
A prefix expression:
To implement this, we give prefix expressions the control expansion:
PrefixExpression-> C,<name>,<assignment-statement>where:
<name>is the variable name that occurs in the prefix expression, and<assignment-statement>is the equivalent updating assignment statement required by the prefix expression.Postfix Expression
A postfix expression:
To implement this, we give postfix expressions the control expansion:
PostfixExpression-> C,<assignment-statement>,<name>where:
<name>is the variable name that occurs in the postfix expression, and<assignment-statement>is the equivalent updating assignment statement required by the postfix expression.Original implementation by @Isha-Sovasaria, changes have since gone stale.
Will aim to take over this feature from here on out.