Content deleted Content added
→Programming language implementations: added vlang |
Jerryobject (talk | contribs) Small WP:COPYEDITs WP:EoS: clarify, WP:TERSE. WP:LINKs: adds, update-standardize, needless-WP:PIPE > WP:NOPIPE. MOS:FIRSTABBReviation clarify, define before parenthetic WP:ABBR. |
||
Line 5:
{{Program execution}}
{{Data transformation}}
A '''source-to-source translator''', '''source-to-source compiler''' ('''S2S compiler'''), '''transcompiler''', or '''transpiler'''<ref name="ARC_1988_Transpiler"/><ref name="Pountain_1989"/><ref name="Sector7_1993_Transpiler"/> is a type of [[
Another purpose of source-to-source-compiling is translating legacy code to use the next version of the underlying programming language or an application programming interface ([[API]]) that breaks backward compatibility. It will perform automatic [[code refactoring]] which is useful when the programs to refactor are outside the control of the original implementer (for example, converting programs from Python 2 to Python 3, or converting programs from an old API to the new API) or when the size of the program makes it impractical or time-consuming to refactor it by hand.
Transcompilers may either keep translated code structure as close to the source code as possible to ease development and [[debugging]] of the original source code or may change the structure of the original code so much that the translated code does not look like the source code.<ref name="Fowler_2013"/> There are also debugging utilities that map the transcompiled source code back to the original code; for example, the [[JavaScript]] Source Map standard{{Citation needed|reason=Not a standard|date=September 2020}} allows mapping of the JavaScript code executed by a [[web browser]] back to the original source when the JavaScript code was, for example, minified or produced by a transcompiled-to-JavaScript language.{{Citation needed|date=September 2020}}
|