support in transformer for assignments#299
Merged
Perryvw merged 3 commits intoTypeScriptToLua:multiphase-transpilefrom Dec 9, 2018
Merged
support in transformer for assignments#299Perryvw merged 3 commits intoTypeScriptToLua:multiphase-transpilefrom
Perryvw merged 3 commits intoTypeScriptToLua:multiphase-transpilefrom
Conversation
Collaborator
Author
|
Looks like I have tests to fix... |
Perryvw
reviewed
Dec 6, 2018
src/TSHelper.ts
Outdated
| return [false, null]; | ||
| } | ||
|
|
||
| public static isNonCompoundPrefixUnaryOperator(node: ts.PrefixUnaryExpression): boolean { |
Member
There was a problem hiding this comment.
Would it not be nicer to have the opposite of this function and just use a negation where you need this? Depends on what the most common case is I guess.
src/TSHelper.ts
Outdated
| || ts.isForStatement(node.parent); | ||
| } | ||
|
|
||
| public static createLuaConcatExpression(left: ts.Expression, right: ts.Expression): LuaConcatExpression { |
Member
There was a problem hiding this comment.
I think @lolleko made a TransformHelper.ts for functions like these.
Collaborator
Author
There was a problem hiding this comment.
Totally missed it! I'll move these over.
Perryvw
approved these changes
Dec 9, 2018
Collaborator
Author
|
Current outstanding issues: |
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.
Everything works (tests are passing), but this could probably use some cleanup/refactoring.
Note, I had to do some split code paths to deal with statements vs expressions.
I noticed in the TS source, operators like +=, -=, etc... are referred to as 'compound assignment operators" so I'm sticking with that terminology for those.