https://github.com/av3boy/if-optimizer
Input your source code as text and the optimzer will clean your code by preferences (WIP)
https://github.com/av3boy/if-optimizer
Last synced: 10 months ago
JSON representation
Input your source code as text and the optimzer will clean your code by preferences (WIP)
- Host: GitHub
- URL: https://github.com/av3boy/if-optimizer
- Owner: Av3boy
- Created: 2021-04-20T18:55:52.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-13T12:48:26.000Z (almost 4 years ago)
- Last Synced: 2023-03-18T16:41:51.021Z (about 3 years ago)
- Language: CSS
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# If-optimizer
Input your source code as text and If-Optimzer will cleanup your code!
## TODO
Categorize refactoring and optimizational functionalities
Refactoring functionalities
Optimization functionalities
Add Functionality for
- C#
- JavaScript
Handle Conditional operator
https://docs.microsoft.com/en-us/cpp/cpp/conditional-operator-q?view=msvc-170
Check block root. block return type
If (with brackets)
If (without brackets)
If (Returns a value from method)
If statement latter parentheses may be on another line
Value tuples
Nesting
nullish coalescing
[monadish transformations](https://youtu.be/C2w45qRc3aU?t=255)
optional chaining
https://en.wikipedia.org/wiki/Abstract_syntax_tree
Ternary Operator (?:)
guard clauses
expression trees
Short Circuits
Else (with brackets)
Else (without brackets)
Else If (without brackets)
Else If (with brackets)
MVP:
C# version: .NET standard 2.0
JS version: ES6
Later versions:
c# Language Version select support
## References
http://dontcodetired.com/blog/post/Whats-New-in-C-10-Reclaim-Horizontal-Editing-Space-and-Simplify-Nesting