Add template strings#28
Merged
Merged
Conversation
Contributor
|
Very cool |
Also adds support for older code generation
Member
|
Did a touch-up pass across the PR. Everything was great on the whole, aside some minor details which I've corrected now. Also, I added support for regular The biggest thing I've changed is in the decompiler logic... as in, I pretty much rewrote it to no longer allocate memory, and to be more efficient and less bug-prone. I added some additional test cases, too. I think this might be good to merge soon, but I am wondering if we can come up with any test cases that fail still. |
Member
|
Merging for now, and will probably make any additional corrections separately! |
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.
This adds support for template string syntax to the compiler and decompiler.
Specifically,
FunctionCallNodes with@@string@@are rewritten asTemplateStringNodes in the cleanup step if applicable. For any cases that seem problematic (e.g. malformed calls with extra arguments, not enough arguments), it falls back to generating a regular function call.Since this might break any projects that rely on the old behavior, a feature flag has been added to
IDecompileOptions(on by default). This also changes the public API.There are also some new tests.