Beautifying for Object Script ?
This a spin of from For and If with one line: to brace or not to brace
Has anyone seen or heard of a Beautifier for Object Script?
There is a bunch of them out for XML, HTML, JavaScript, CSS, PHP, .... https://codebeautify.org/
What I think of is a utility / package that is able to
- #1 format your source code by appropriate Tabs/Spaces
- #2 (more important) - to replace legacy notation with bracket notation - to wrap all kind of (post-)conditions in JavaScript style
I'ts definitely a tricky thing.
And I never head of any attempt to do it.
A simple example:
IF a=2 set b=2
ELSE set b=0
ELSE set b=0
might become
set $TEST= (a=2)
IF ($TEST) { set b=2 }
ELSE {set b=0 }
IF ($TEST) { set b=2 }
ELSE {set b=0 }
to move to brackets and maintain $TEST correctly
Also covering all the other strange things you know all