src/ramdascript.js
function srcToChunks(src, opts, ctx) {
    opts = opts || {}
    var ast = parse(src, opts)
    // check semantic
    var errors = semantic.checkAst(ast, ctx)
    // there is semantic errors?
    if (errors) {
        if (opts.printErrors !== false) {
                errors.forEach(function(e){
                console.error(e)
            })
        }
        return
    // everything ok
    } else {
        return compiler.astToChunks(ast, ctx, opts.format)
    }
}
function srcToChunks(src, opts, ctx) {
    opts = opts || {}
    var ast = parse(src, opts)
    // check semantic
    var errors = semantic.checkAst(ast, ctx)
    // there is semantic errors?
    if (errors) {
        if (opts.printErrors !== false) {
                errors.forEach(function(e){
                console.error(e)
            })
        }
        return
    // everything ok
    } else {
        return compiler.astToChunks(ast, ctx, opts.format)
    }
}
transform RamdaScript source to chunks