970 B



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.


The following example should be able to successfully compile into JavaScript:

<!DOCTYPE coesite>

    <variable name="number">
        <p type="number">5</p>

    <function name="add" arguments="num1, num2">
            <!-- raw data -->
            <r>num1 + num2</r>

    <variable name="res">
        <call name="add" input="number, 5" />

    <call name="console.log" input="res == 10" />
let number = 5;
function add(num1, num2) {
return num1 + num2;
let res = add(number, 5);
console.log(res == 10);