Allow root functions defined via @plugin

This commit is contained in:
Matthew Dean
2016-01-26 16:54:51 -08:00
parent 809f1b1862
commit 7f535a891d
14 changed files with 91 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
functions.addMultiple({
"test-detached-ruleset" : function() {
var rule = new tree.Rule('prop', new tree.Anonymous('value'));
return new tree.DetachedRuleset(new tree.Ruleset("", [ rule ]));
},
"test-directive": function() {
return new tree.Directive("@charset", new tree.Anonymous('"utf-8"'));
},
// Functions must return something. Must 'return true' if they produce no output.
"test-undefined": function() { }
});