src/parser.js
function parse(tokens) {
    let tr = TReader.create(prepareTokens(tokens));
    let nodes = [];
    while (true) {
        if (tr.accept("$")) {
            return nodes;
        }
        if (tr.accept("text")) {
            nodes.push(parseText(tr));
        } else if (tr.accept("tag_0")) {
            nodes.push(parseTag0(tr));
        } else {
            tr.expect("tag_1");
            nodes.push(parseTag1(tr));
        }
    }
}
function parse(tokens) {
    let tr = TReader.create(prepareTokens(tokens));
    let nodes = [];
    while (true) {
        if (tr.accept("$")) {
            return nodes;
        }
        if (tr.accept("text")) {
            nodes.push(parseText(tr));
        } else if (tr.accept("tag_0")) {
            nodes.push(parseTag0(tr));
        } else {
            tr.expect("tag_1");
            nodes.push(parseTag1(tr));
        }
    }
}
function parse ( tokens ) { let tr = TReader . create ( prepareTokens ( tokens ) ) ; let nodes = [ ] ; while ( true ) { if ( tr . accept ( "$" ) ) { return nodes ; } if ( tr . accept ( "text" ) ) { nodes . push ( parseText ( tr ) ) ; } else if ( tr . accept ( "tag_0" ) ) { nodes . push ( parseTag0 ( tr ) ) ; } else { tr . expect ( "tag_1" ) ; nodes . push ( parseTag1 ( tr ) ) ; } } }
array => array
array = > array