Stubbing out assert, trying to get higher-level stylesheets

This commit is contained in:
Tom MacWright 2011-06-14 15:01:11 -04:00 committed by javi
parent f11259d734
commit bfc92c26bc
2 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,7 @@
(function(tree) { (function(tree) {
var assert = require('assert'); var assert = require('assert') || {
ok: function() { }
};
tree.Definition = function Definition(selector, rules) { tree.Definition = function Definition(selector, rules) {
this.elements = selector.elements; this.elements = selector.elements;

View File

@ -17,11 +17,13 @@
}; };
(new carto.Parser(parse_env)).parse(style, (new carto.Parser(parse_env)).parse(style,
function(err, ruleset) { function(err, ruleset) {
for (var i in ruleset.rules) { var definition = ruleset.toList(parse_env);
for (var j in ruleset.rules[i].rules) { console.log(definition);
document.getElementById('output').innerHTML += ruleset.rules[i].rules[j].eval(parse_env).toXML(parse_env) + ' '; // for (var i in ruleset.rules) {
} // for (var j in ruleset.rules[i].rules) {
} // document.getElementById('output').innerHTML += ruleset.rules[i].rules[j].eval(parse_env).toXML(parse_env) + ' ';
// }
// }
}); });
}); });
} }