make a separate file for the code generation

This commit is contained in:
Christopher Chedeau
2014-04-18 12:10:02 -07:00
parent 803aabf37f
commit 8317054606
2 changed files with 26 additions and 12 deletions

View File

@@ -271,15 +271,3 @@ var computeLayout = (function() {
})();
var c_code = computeLayout.layoutNode.toString()
.replace(/\.children\.length/g, '.children_count')
.replace(/layout\[dim/g, 'layout.dimensions[dim')
.replace(/layout\[pos/g, 'layout.position[pos')
.replace(/layout\[leading/g, 'layout.position[leading')
.replace(/style\[dim/g, 'style.dimensions[dim')
.replace(/node\./g, 'node->')
.replace(/child\./g, 'child->')
.replace(/var\/\*([^\/]+)\*\//g, '$1')
.replace(/\n /g, '\n');
console.log(c_code);