diff options
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index a689e7d..64af5da 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -156,6 +156,15 @@ Compiler.prototype = { this.opcode('append'); }, + DecoratorBlock(decorator) { + let program = decorator.program && this.compileProgram(decorator.program); + let params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + PartialStatement: function(partial) { this.usePartial = true; @@ -201,6 +210,10 @@ Compiler.prototype = { this.opcode('append'); } }, + Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + ContentStatement: function(content) { if (content.value) { |