Coesite
About
Coesite is a simple markup language based on XML which can compile into anything (given a definition string). Coesite is simply enough to be written manually, or to be a compiler target itself. Coesite must be given a language definition which will control what Coesite primitives compile into.
Example
The following example should be able to successfully compile into JavaScript:
<!DOCTYPE coesite>
<coesite>
<variable name="number">
5
</variable>
<function name="add" arguments="num1, num2">
<return>
<!-- raw data -->
<r>num1 + num2</r>
</return>
</function>
<variable name="res">
<call name="add" input="number, 5" />
</variable>
<call name="console.log" input="res == 10" />
</coesite>
let number = 5;
function add(num1, num2) {
return num1 + num2;
}
let res = add(number, 5);
console.log(res == 10);